Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1361904

    hi Support,

    we use the function to replace the Label “all” in our masonry. We use more than one masonry in our theme. How can we change the label only for the special mesonry element?

    add_filter(‘avf_masonry_sort_first_label’,’new_masonry_first_label’);
    function new_masonry_first_label() {
    $first_item_name = “NEW ALL TEXT “;
    return $first_item_name;
    }

    Thanks for your help!

    Best regards!

    Tobias

    #1361982

    Hi Tobias,

    I’m not really sure what you meant by special masonry element, however, you can use WordPress Conditional Tags to point to a specific page. https://codex.wordpress.org/Conditional_Tags
    Hope it helps.

    Best regards,
    Nikko

    #1362042

    Hi Nikko,

    thanks for your answer – please help me a little bit more – i´m not a php profi.

    How can i do this on special page id?

    Thanks a lot!

    Best regards!

    Tobias

    #1362049

    can you try this:

    add_filter("avf_masonry_sort_first_label", function($first_item_name) {
        if(is_page(2623)) {
            $first_item_name = "ABC"; 
        }
        if(is_page(array( 123, 38147 ))){ 
            $first_item_name = "DEF"; 
        }
        return $first_item_name;
    }, 10, 1);

    ID’s without quotation marks – page-names with

    #1362050

    Vielen herzlichen Dank Günni!

    Beste Grüße

    Tobias

    #1362084

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

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