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

    Hi There,

    I am creating a page that uses a Masonry Gallery to display Portfolio Entries.

    This is working fine, however I want to add a “button” using a shortcode to the Portfolio Excerpt. I have found several threads on this but none seem to refer to the av-helper-masonry.php file which I believe is the file that needs modifying?

    The closest I get is a post

    which says

    I have added in the following line to the helper-masonry.php file.
    Line 406: $this->loop[$key][‘content’] = do_shortcode($entry->post_excerpt);
    With that shortcodes work.”

    Well I tried adding this to line 437 of the av-helper-masonry.php file after line 436 below
    $this->loop[$key][‘content’] = strip_tags( $entry->post_excerpt );

    I can see the button appear but where before the excerpt was below the image the excerpt is to the right and so is the button. The next image in the Portfolio sits just below the 1st images excerpt and button.

    I am nearly there and your help would be appreciated. I am just not sure if I am putting the code in the correct place or I should add something else.
    Thanks
    Andy

    #843839

    Hey andybarn,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #844917
    This reply has been marked as private.
    #847054

    Hi,

    You should replace “strip_tags” with the “do_shortcode” function if you want the shortcodes to render in the masonry element but it’s not recommended because it will break the layout of the masonry items.

    Best regards,
    Ismael

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