Community Forums › Forums › Archived Forums › General Discussion › Blog Category Split-Off?
- This topic has 7 replies, 3 voices, and was last updated 10 years, 7 months ago by olivier.moreau.
-
AuthorPosts
-
September 18, 2013 at 8:30 am #63195langMember
Hi there!
I am developing a complicated website where I will be managing various special "projects," each involving a number of subpages:
The specific "project" I want to talk about can be found under the navigation tab "Vignettes & Essays." Check out our "Vignettes Sample Page," which deviates considerably from our standard page design:
http://miracleofnature.org/vignettes/sample-vignette/
Ultimately we will publish hundreds of different nature vignettes, which will be quite a challenge to manage and organize. Given that our vignettes are all "pages," archives of our vignettes would have to be created by hand (or by using this or that page-oriented plugin). Well ... wouldn't it be nice to have access to all the management features that we have in our Blog, where "posts" can be categorized and category archives automatically displayed?
So we're naturally wondering if we should create our Nature Vignettes via our Blog, categorizing each under a "Vignette" category, and then using a "Vignette Label" to impose our unique vignette page design. I think this would be easy to implement, but we would also have to somehow separate our vignettes from our standard blog archive and make them appear as a totally separate kind of content, accessible from our primary navbar menu (this is easy), and also displayed in archives that are automatically created by WordPress.
Thus, our vignettes category would somehow be "split-off" from the rest of our blog so that it would appear to website visitors as being a completely different type of content, accessed separately from our Blog. In other words, it would be part of our Blog, but not obviously so (except maybe to an expert WordPress programmer). I think this can be done, but I have only the vaguest notion how to pull it off.
Any suggestions will be much appreciated. I suspect we'll need to hire some help here, especially if it involves creating new category templates and the like.
http://miracleofnature.orgSeptember 18, 2013 at 10:44 am #63225Brad DaltonParticipantHow about a custom post type?
You could also add a portfolio style archive page for posts assigned to the CPT.
On top of this you could use custom fields to style only the single CPT's.
Written about this several times.
September 18, 2013 at 12:07 pm #63238langMemberBrad:
This looks like an excellent way to solve my problem. I'm a beginner with this and hence didn't know squat about CPTs. Now I know a "little" and it looks perfect!
So where have you written about this?
Also, I presume you are available for consultation should we need some help pulling this off?
September 18, 2013 at 2:37 pm #63265Brad DaltonParticipantSeptember 19, 2013 at 10:24 am #63380olivier.moreauMemberHi Lang and Brad
Although my project is very different in its content, I share the same technical problem : a “split-off” blog as you call it.
My post about it is : http://www.studiopress.community/topic/what-is-the-best-way-to-create-a-custom-blog-template/I just checked Brad's tutorial and it's a very complete solution based on Custom Post Type. However if you just want to split-off some posts based on the “Vignette” category (and in my case on the "expos" category) I don't think that will do it.
A very simple template to split off your posts using the "vignette" category (let's say ID=135) :
<?php /* Template Name: Blog_splitoff */ ?> <?php get_header(); ?> <div class="content"> <?php $temp = $wp_query; $wp_query = NULL; $wp_query = new WP_Query(); $wp_query->query('cat=135'); $tb_counter = 1; while ($wp_query->have_posts()) : $wp_query->the_post(); ?> <div <?php if(function_exists('post_class')) : ?><?php post_class(); ?><?php else : ?>class="post post-<?php the_ID(); ?>"<?php endif; ?>> <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s'),the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2> <div> <?php global $more; $more = 0; the_content(); ?> <?php if ($tb_counter == 1) { ?> <?php } ?> </div><div class="clear"></div> </div><div class="clear"></div> <?php $tb_counter++; endwhile; ?> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?> <?php $wp_query = NULL; $wp_query = $temp;?> </div> <?php get_footer(); ?>
This code comes from various source (WP codex and such) and it is NOT optimized for Genesis but it works.
You just create an empty page using it, put that page in you menu and that's it.
I think there must be simpler with a Genesis filter using the 'blog_cat' value but I can't yet figure out how it works.September 19, 2013 at 10:50 am #63389Brad DaltonParticipantThere's a post about creating a blog page for any category posted by Brian Gardner.
September 19, 2013 at 11:42 am #63400olivier.moreauMemberNo luck !
http://www.briangardner.com/blog-page-single-category
gives error 404...September 19, 2013 at 12:25 pm #63408olivier.moreauMemberI found the EASY way without ANY coding at all !
http://www.basicwp.com/filter-posts-by-category-tag-genesis/#
You simply create a page with the blog template and you add a custom field
name : query_args
value : category_name=VignetteYou can use all kind of values. Check :
http://codex.wordpress.org/User:JamesVL/query_posts -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.