Display specific post at top with other post belongs to a category
First i should say, i am very new to PHP. Just searching,learning and applying to modify theme.
I have created child theme and made a page template which will show the post thumbnail according to category. I want to display 2 post per category, where a specific post will be shown at top and latest one will be shown below that post. Please check this layout image to get my idea – https://dl.dropboxusercontent.com/u/108458626/Category%20sample1%20for%20code.png
My first idea was to query sticky post. But i learned, sticky post doesn’t work with category.
Second idea was to query specific tag. The code is here – http://pastebin.com/jhZBBwPy
By this way i get only specific post. I want to get another latest post below this but don’t know how. I searched around but didn’t get exact solution or i don’t know what to search for this problem.
Is someone can help me with considering my bad English and short knowledge. Thanks in advance.
- The topic ‘Display specific post at top with other post belongs to a category’ is closed to new replies.