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

    Hi there!

    I found this post regarding shortcodes on Excerpt with masonry https://kriesi.at/support/topic/add-shortcode-to-masonry-excerpt/ and it worked for me the only thing is the excerpt has link as well and ruined the masonry style but I guess it can be solved if the whole excerpt was not linked. I only wanted to display the shortcode which is in my case a custom menu widget that I placed inside an excerpt.

    Thanks in advance
    Ryan

    #683389

    Hey Prevention_Institute!

    Can you please share with us some more details, like a link to the page, so we can give it a look and try assist you better>

    Thanks a lot for your understanding and patience

    Cheers!
    Basilis

    #683420

    Hi Basilis,

    Thanks for the quick response! So here is an example page http://dev.skprevention.ca/p/ our website is still in dev mode so I will give you login credentials below. I have set up a page pulling content for ‘topic are’ category using masonry. I wanted to display a custom menu widget I created and put it inside the excerpt. i added a shortcode [av_sidebar widget_area='Alcohol Front Page Menu'] to pull the menu widget and pasted in excerpt but it’s not working. I tried to do the code posted here https://kriesi.at/support/topic/add-shortcode-to-masonry-excerpt/ and it worked but the whole excerpt now got link and it ruined the masonry layout.

    FYI, I removed the code I copied from the link above. I wanted to show you first what I want to achieve.

    Thanks,
    Ryan

    #683433

    I am also wondering why it’s not displaying alphabetically properly. I have set the order by ‘Title’ and ‘Ascending’.

    Thanks in advance
    Ryan

    #684861

    Hey

    I wanted to display a custom menu widget I created and put it inside the excerpt. i added a shortcode [av_sidebar widget_area='Alcohol Front Page Menu'] to pull the menu widget and pasted in excerpt but it’s not working

    I’m sorry but you cannot add menu items with a link inside the masonry items because the whole container is already a link or wrapped inside a link tag. Links inside are not going work properly.

    Regards,
    Ismael

    #685338

    Hi Ismael,

    Thanks for responding. Links are actually working when I edit this line of code from line 433 on av-helper-masonry.php:

    $this->loop[$key][‘content’] = $entry->post_excerpt;
    to
    $this->loop[$key][‘content’] = do_shortcode($entry->post_excerpt);

    but it just messed up the layout. Checkout http://dev.skprevention.ca/p/ if it’s okay.

    Thanks,
    Ryan

    #685359

    Hey!

    Parsing those values as a shortcode, is not right becuase, what you do is allowing the html to pas but yes, it messes the shortcode.
    It would require to use a different way there to pass the values, to make it work I am afraid.

    Cheers!
    Basilis

    #685368

    Thanks Basilis! okay good to know.

    #686145

    Hi,

    Glad we could help :-)

    Please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

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