Loading individual category post via dynamic tabs
-
I’ve been searching for a navigation solution for my wordpress site’s front page that loads individual categories and their corresponding post through dynamic tabs. These are tabs or buttons that load content without the entire page needing to reloaded itself.
A site (Not wordpress one) with the type of feature on their front home page I’m describing is http://www.ign.com.
Under their rotator they have tabs for “Top Stories” as well as “All Updates” along with a list of individual news categories; All, Xbox 360, Xbox One, PS3, PS4, Wii U, PS Vita, PC, 3DS, etc. When one of them is clicked it instantly loads up a list of the latest 25 news post from that category. I’m looking to do something very similar or at least close to it!
I’ve already looked into tutorials and Jquery plugins such as http://os.alfajango.com/easytabs/ , but I need to somehow integrate that or something like it with my post loop:
<?php if ( have_posts() ) : ?> <?php bp_dtheme_content_nav( 'nav-above' ); ?> <?php while (have_posts()) : the_post(); ?> <?php do_action( 'bp_before_blog_post' ) ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="line-divide"> <div class="post-img"> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" > <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'homepage-thumb' ); } ?> </a> <div class="clear"></div> <span class="thumb-movie"><span class="text"> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >Play</a></span></span> </div> <div class="sidecontent"> <div class="post-content"> <p class="post-info"> <span class="cat"><?php the_excluded_category(array(12,21,22,23,24,25,26,27)); ?></span> <span class="line">|</span> <span class="bun"><a href="<?php comments_link(); ?>"></a></span> <span class="count"><a href="<?php comments_link(); ?>" title="Comments"><?php comments_number('0', '1', '%'); ?></a></span> </p> <span class="date"><?php the_time('D, n–j–Y'); ?> @ <?php the_time('g:i a'); ?></span> <h3 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php trim_title(); ?></a></h3> <div class="excerpt"> <?php echo get_excerpt(150); ?> <div class="clear"></div> </div> <p class="postmetadata"></p> </div><!---- end of entry------> </div><!---- end of line-divide------> </div><!---- end of post-content------> </div><!---- end of sidecontent------>I assume I’d need to make individual post loops for each category in order for it to work. If I could get some advice on this subject to start me on my way, I would be very grateful!
Thanks again in advance!
The topic ‘Loading individual category post via dynamic tabs’ is closed to new replies.