Offset posts on Category Pages

Posted in: Newspaper
Post count: 156

Hello,

Hope all is well with the TagDiv crew.

I have been successful in offsetting the posts on my Home page, but I have not been able to find an solution to offsetting the posts below my main slider on Category Pages.

Any help you can provide to resolve this is greatly appreciated. I use the Child Theme.

Thanks.

Philip

Post count: 6600

Hi,

Use this filter http://pastebin.com/VJssRkec
Add it in functions.php file and modify the offset as you like, currently is set to 5.

Thanks

Post count: 156

Thanks for the code Lucian. Do you also have a way to set the number of slides on the Category Pages?

Philip

Post count: 6600

Hi,

Yes, you can do it from page-category-slider.php file, like this: http://screencast.com/t/W6rSS5pbzQk just add 'limit' => 2 and change the value of the limit on how many posts you want the slider to show. Also make sure you put this comma http://screencast.com/t/FUOHjRtcCrZX otherwise it will not work.

Thanks

Post count: 156

Thank you.

Have a great day.

Philip

Post count: 156

Alin,

Hope you and the rest of the Tagdiv crew are doing well. I wanted to find out if there is a way to randomize the category slider?

I hope you have a solution.

Have an awesome day!

Philip

Post count: 7909

Hi,

As you can see in the code the sort order for category slider is featured, so if you want to show random post there you can change it like this – http://screencast.com/t/3KrBRq56ATC

random_posts

Thanks!

Post count: 156

Thank you Alin. Works like a charm. One more question on this: is there a way to make it random by category instead of random from all posts? I should have been more specific when I initiated the question.

Philip

Post count: 156

…or does this already randomize for the specific category? It seems like it does, but I’d like to be sure there are no other settings.

Philip

Post count: 7909

Hi,

You have changed only the sort order so the articles from slider should be displayed from the same category.

Thanks!

Viewing 10 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic.