Quantcast
Channel: ThemeShaper Forums Topic: previous link in category showing same current posts
Browsing all 10 articles
Browse latest View live

lastraw on "previous link in category showing same current posts"

I think I remember seeing the answer to this here somewhere but can't find it. Here is an example on my test site: http://www.dingdongnation.com/category/life/ (sorry takes a long time to load) at the...

View Article



middlesister on "previous link in category showing same current posts"

I think the solution was about filtering the query so that the pagination bit is not overwrittenglobal $wp_query; $args = array_merge( $wp_query->query, array( 'cat'=>3 ) ); query_posts( $args );

View Article

lastraw on "previous link in category showing same current posts"

Thanks middle sister (5 months later!) but I'm not sure how this would integrate with the code that's there now? <?php // calling the header.php get_header(); ?> <div id="box-wide">...

View Article

helgatheviking on "previous link in category showing same current posts"

@laststraw - is that a page template? what are you trying to do? is this loop a second query?though my first guess is you need to reset the query with wp_reset_query();after you're done w/ it

View Article

middlesister on "previous link in category showing same current posts"

If you give a string to query_posts, then in order to keep your pagination bit replace the query_posts call withquery_posts( $query_string . '&category_name=life' );If you don't keep the query...

View Article


lastraw on "previous link in category showing same current posts"

Thanks, it's a category template and works now with<?php // posts from category 'life' global $wp_query; $args = array_merge( $wp_query->query, array( 'category_name'=>'life' ) ); query_posts(...

View Article

middlesister on "previous link in category showing same current posts"

Hm, if it is a category template then why are you using query_posts? You can just make a file named category-life.php and it will be used on that category.

View Article

helgatheviking on "previous link in category showing same current posts"

yup, that's template hierarchy: http://codex.wordpress.org/Template_Hierarchy#Category_displaybut from what you've posted it doesn't look like you are doing enough to warrant a template. if you are...

View Article


lastraw on "previous link in category showing same current posts"

OK, thanks, that makes sense. Mostly here I'm just trying to understand how category-x.php works. This was an early attempt to display posts from different categories w/different page layouts and...

View Article


helgatheviking on "previous link in category showing same current posts"

don't use page templates for something category templates will do. you can ditch that /category/ slug in your URL w/ some htaccess trickery. yoast's Wordpress SEO plugin will do it w/ a click.

View Article
Browsing all 10 articles
Browse latest View live


Latest Images