Change order of gallery items with show_post_snippets shortcode?

Support Forums for LiveMesh Themes & Plugins Forums Agile Theme Support Change order of gallery items with show_post_snippets shortcode?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5986
    Jhodgskijhodgski
    Member

    I’m using the show_post_snippets shortcode to show a gallery as follows…

    [show_post_snippets post_type=”gallery_item” number_of_columns=”4″ post_count=”8″ image_size=”medium” no_margin=”true” taxonamy=”category” terms=”my-cat-slug”]

    …and I’ve tried changing the order of them using the “Re-Order” tool/page, but it doesn’t affect how they are ordered on the front end.

    Have searched, but cannot find any documentation anywhere for the show_post_snippets shortcode.

    So how can I set the order of my gallery items?

    #5997
    ErnestoErnesto
    Member

    Hi, do you have a link or a test user so we can check the issue and provide you with the exact code you need?

    #6011
    Jhodgskijhodgski
    Member

    No, I’m afraid it’s not online yet.

    #6091
    ErnestoErnesto
    Member

    Hi, it´s difficult to know why the issue is being produced on your webpage. You can enter the following code after line 149 in the file framework/shortcodes/post-shortcodes

    'orderby' => 'menu_order'

    #6092
    RaghavendraRaghavendra
    Moderator

    The latest version released 2.1 has detailed documentation on the shortcode in the documentation. We do not sort the portfolio by order attribute since some of our users complained about having to reorder everything when they need it to be sorted by date(default behavior). You can change the shortcode to sort by order attribute by making code change in file framework/functions/post-functions.php file at line number 503 to insert the left positioned query attribute –

    $loop = new WP_Query(array('post_type' => $post_type, 'posts_per_page' => $post_count,
                    'tax_query' => array(array(
                        'taxonomy' => $taxonamy,
                        'field' => 'slug',
                        'terms' => explode(',', $terms),
    ‘orderby’ => ‘menu_order’,
    ‘order’ => ‘ASC’,
                    ))));
    

    Hope that helps.

    #13129

    This code breaks my site in Austin.

    • This reply was modified 5 years, 10 months ago by HenkinSchultzHenkinSchultz.
    • This reply was modified 5 years, 10 months ago by HenkinSchultzHenkinSchultz.
    #13199
    RaghavendraRaghavendra
    Moderator

    HenkinSchultz – I replied to the other thread. Since you are using [show_portfolio] shortcode, pls make the change in line number 143 in portfolio-functions.php file to –

    $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => $posts_per_page, 'order' => 'ASC', 'orderby'=>'menu_order'));
    

    That should help rearrange the portfolio order using Post Type Reorder plugin. If not, pls post a temp login and we can take a look.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Change order of gallery items with show_post_snippets shortcode?’ is closed to new replies.