WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Posting in a Group Section. (6 posts)

  1. thoughtpalettechris
    Member
    Posted 3 years ago #

    I have a dilemma, and I've spent ages trying to find a solution for.

    I'm developing a site that needs a post section that is CMS client friendly that will allow the user to create a group, and post in that group section.

    ie. Book reviews is the section. Book review posts are all group under that section.

    Book Reviews
    ->Book Review Posts.

    The Book Reviews section would be a level 2 nav item. and would permalink to the most recent posting in that section. Then when you get there, the prev and next buttons at the top and bottom of the post would link to other reviews under that section.

    I would eventually need multiple sections that the client can create and organize themselves optimally.

    I've looked at several plugins and the closest one I found was http://localhost/steppenwolf/wp-admin/plugin-install.php?tab=plugin-information&plugin=postgroups&TB_iframe=true&width=640&height=754

    Which doesn't go up to my version, but essentially I need that functionality.

    Thanks in advance for your kind help and suggestions regarding a solution.

    ps. Using the twentyten as a parent theme while theming the child.

    Thanks!

  2. thoughtpalettechris
    Member
    Posted 3 years ago #

    I've tried http://wordpress.org/extend/plugins/custom-post-type-ui/ to no avail.

    I am already using a CPT manually but figured i'd give that a go, anyone else?

  3. thoughtpalettechris
    Member
    Posted 3 years ago #

    I was able to create a new CPT area like my other one currently on my site.

    It looks like this in my functions.php

    // Fire this during init
    	register_post_type('playwright', array(
    		'name' => __( 'playwright-post', 'massive' ),
    		'label' => __('playwrights'),
    		'singular_label' => __('playwright'),
    		'public' => true,
    		'show_ui' => true,
    		'capability_type' => 'post',
    		'hierarchical' => false,
    		'rewrite' => true,
    		'query_var' => false,
    		'supports' => array('title', 'editor', 'author'),
    	) );

    and like this is my template file calling the loop.

    <?php $playwright_posts = new WP_Query(array("showposts" => 3, "orderby" => "date", "post_type" => "playwright")); ?>
        <?php if ( $playwright_posts->have_posts() ) : ?>
        <?php while ( $playwright_posts->have_posts() ) : $playwright_posts->the_post(); ?>
    
        <div class="post_playwright">
          <?php the_content(); ?>
        </div>

    Now I have a new area where I can create posts again and it posts to the correct directory. ie playwrights.

    But now I need to make multiple posts within this playwright catagory. ie PlayWrightOne will have multiple sub stories that I need to link to that page, which needs to be linked to the playwrights directory.

    Need more infoz?

  4. thoughtpalettechris
    Member
    Posted 3 years ago #

    Now I've created a playwright category, linked my top level nav item to the catagory.

    Trying to figure out these subsections with subsections.

  5. thoughtpalettechris
    Member
    Posted 3 years ago #

    Still stuck on this issue :{

  6. thoughtpalettechris
    Member
    Posted 3 years ago #

    Finally figured it out a little.

    Created a CPT.
    Created a Group Category ie. Plays
    Created a sub-category ie playname.
    Added Category function to CPT.
    Edited the single.php file navigation to only include category

    <div class="nav-previous"><?php previous_post_link('%link', '%title', 'in_same_cat', TRUE); ?></div>
    <div class="nav-next"><?php next_post_link('%link', '%title', 'in_same_cat', TRUE); ?></div>

    Then link my nav menu items to the category post permalink.

    Voila.

    Now when they create posts in the CPT, it'll show up and group posts only by category. Exactly what I needed.

    Figured I'd post my solution if anyone has needs to do this or is as new as me.

    Now I just need to see how I can roll that into my recent post's widget on my homepage, and my comments template at the bottom of the page isn't working yet.

    blop

Topic Closed

This topic has been closed to new replies.

About this Topic