Deactivating Post types order for blog posts
-
Hey,
thanks for this wonderful plugin. On my website, I have a portfolio that is based on the post format. I am using the custom order for the portfolio. On the blog, I just want to have a descending order, but somehow the posts are shown all random. Could I deactivate the custom order for the blog posts, without affecting the portfolio?
I found this code online:
add_filter('pto/posts_orderby/ignore', 'theme_pto_posts_orderby', 10, 3); function theme_pto_posts_orderby($ignore, $orderBy, $query) { if( (! is_array($query->query_vars['post_type']) && $query->query_vars['post_type'] == 'post') || (is_array($query->query_vars) && in_array('post', $query->query_vars))) $ignore = TRUE; return $ignore; }
This code helped for having the regular order for the blog posts, but unfortunately, my custom order for the portfolio was not working anymore.
Please help!
The page I need help with: [log in to see the link]
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Deactivating Post types order for blog posts’ is closed to new replies.