Displaying related posts from specific category
-
Hi. i want to make in pages template some changes. I thought about making some sections in any post, where putting in ajax 3 buttons inside the posts related to it; something like sectioning the article.
EX: Post name: SUA. with some description text. 1’st button called images will drop down, with the links for related posts from category images. 2’th button called States, also with some related posts from category states. etc…
In this way, i can make more posts, and the principle one to be optimized, more likely for the visitors, and easily for reading.I found in support forum this code for making some related to what i said.
<? query_posts(array( 'cat'=>'cat_here', 'tag_slug__and'=>array('tag_here'), 'orderby'=>'title', 'showpost'=>'5', 'order'=>'ASC', ) ); ?>
This is working smoothly, but i want to make this for all posts, not for one only. and also saw here this one for make this thing working generally:
<? $current_tag = single_tag_title("", false); query_posts(array( 'cat'=>'cat_here', 'tag_slug__and'=>array($current_tag), 'orderby'=>'title', 'showpost'=>'3', 'order'=>'ASC', ) ); ?>
but, when i use this one, i’m getting a blank page.
do you have any ideas ?
- The topic ‘Displaying related posts from specific category’ is closed to new replies.