blog template + portfolio order

Mauer Themes Support Stills blog template + portfolio order

Tagged: ,

This topic contains 3 replies, has 2 voices, and was last updated by  Paul 4 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2850

    Itemvirtual
    Participant

    Hello,
    I would like to control post order in frontsite (http://vpp.itemvirtual.com/proj-cat/obra/)
    Instead I have Installed and activate the Intuitive Custom Post Order plugin, i can drag & drop posts in backsite but
    they don’t change their order in frontside. Either by changing portfolio post date.

    Other thing is if it’s posible to use 2 different blog templates for different pages?
    I mean, i have 2 different blog categories in the menu that would like to show as differnt layout (one by list: http://vpp.itemvirtual.com/category/intervenciones/, and the other as a grid: http://vpp.itemvirtual.com/category/exposiciones-y-actualidad/).
    By the moment, on Theme options, i see that only can asign one template for all blog pages. Is there a wey to use different templates?

    #2903

    Paul
    Keymaster

    Hello Mariona,

    As for the Intuitive Custom Post Order plugin. I’ve checked it on my installation, and it works for the main portfolio feed. Whereas it does not work for portfolio category archives (like your http://vpp.itemvirtual.com/proj-cat/obra/). This seems to be a bug of this plugin — not taking care of the order of posts in custom taxonomy archives. I’ve created a quick fix though.

    If you insert this code at the end of the intuitive-custom-post-order.php in the plugin folder (just before the closing ?> tag), your portfolio projects will be sorted based on how you drag-n-dropped them in the admin panel. Here is the code:

    function sort_tax_by_menu_order($query) {
    
    	if (!is_admin() && $query->is_main_query() && is_tax('project_cat')) {
    		$query->set('orderby', 'menu_order');
    		$query->set('order', 'ASC');
    	}
    }
    
    add_action('pre_get_posts', 'sort_tax_by_menu_order');

    Here is how the end result should look like (click to enlarge):

    As for using different blog layout options for different archives, unfortunately, this can not be done.

    Regards,
    Paul

    #2911

    Itemvirtual
    Participant

    Thanks!
    Mariona

    #2991

    Paul
    Keymaster

    You are very welcome, Mariona.

    If you enjoy the theme (or the support), I would be really grateful if you could rate it on ThemeForest. This literally takes a moment, and creates a big difference. Thanks.

    Regards,
    Paul

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.