Blog Category Split-Off?

Community Forums Forums General Discussion Blog Category Split-Off?

This topic is: not resolved

This topic contains 7 replies, has 3 voices, and was last updated by  olivier.moreau 1 year, 1 month ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #63195

    lang
    Participant
    Post count: 4

    Hi there!

    I am developing a complicated website where I will be managing various special “projects,” each involving a number of subpages:

    http://miracleofnature.org

    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.org
    #63225

    braddalton
    Participant
    Post count: 10217

    How 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.


    #63238

    lang
    Participant
    Post count: 4

    Brad:

    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?

    #63265

    braddalton
    Participant
    Post count: 10217
    #63380

    olivier.moreau
    Participant
    Post count: 48

    Hi 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.com/forums/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.

    #63389

    braddalton
    Participant
    Post count: 10217

    There’s a post about creating a blog page for any category posted by Brian Gardner.


    #63400

    olivier.moreau
    Participant
    Post count: 48
    #63408

    olivier.moreau
    Participant
    Post count: 48

    I 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=Vignette

    You can use all kind of values. Check :

    http://codex.wordpress.org/User:JamesVL/query_posts

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.