Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1038643

    I have a search function where the visitor can search posts by combining categories and also free textsearch.
    I put those parameters into a query that returns the posts that matches the search.
    I convert those posts to a string of ids that I put into a shortocde like the one below.

    [av_masonry_entries ids='1662,1621,135,1232,'1456' ]

    I has been working splendid, but it doesnt work anymore, it seems like the shortocde handler ignore the shortcodeattribute “ids” , because it retrurns all posts not only those whot match the search.

    I cant find anything in the supportfoum or in the documentation that will help me, can you?

    Regards Johan

    #1038657

    I have checked so the string with the ids is correct, the search working and correct ids are returned.

    #1038696

    Hi,

    Did you need further help or shall we close this topic?

    Best regards,
    Jordan Shannon

    #1038880

    I need help to get the masonry shortcode work se my first psot, it ignores the ids .

    #1040685

    Any ideas about my problem?

    #1040689

    Hi,

    You can only specify the “ids” attribute when you’re using the Masonry Gallery element or when you’re working with attachments/images. It’s not going to work with posts.

    Example:

    
    [av_masonry_gallery ids='3503,3488,3591,3368' items='24' columns='flexible' paginate='pagination' size='flex' orientation='' gap='large' overlay_fx='active' animation='active' container_links='active' id='' caption_elements='title excerpt' caption_styling='' caption_display='always' color='' custom_bg='' av-medium-columns='' av-small-columns='' av-mini-columns='' av_uid='av-jp9l3263' custom_class='']
    

    However, it’s still possible to display items based on post ids by using the “avia_masonry_entries_query” filter.

    
    add_filter('avia_masonry_entries_query', 'avia_masonry_entries_query_mod', 10, 2);
    function avia_masonry_entries_query_mod($query, $params) {
        $query['posts__in'] = array( 2, 5, 12, 14, 20 );
        return $query;
    }

    Best regards,
    Ismael

    #1040743

    OK, but it has been woking before.
    I will check out your solution.

    #1040744

    Its not [av_masonry_gallery] I use, its [av_masonry_entries] , but maybe that wont change anything?

    #1041074

    Hi,

    Yes, I know. Again, ids attribute is not supported by the “av_masonry_entries” shortcode. You can only use that attribute or parameter on a “av_masonry_gallery” shortcode.

    Best regards,
    Ismael

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