-
AuthorPosts
-
September 7, 2016 at 9:22 pm #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
RyanSeptember 7, 2016 at 9:41 pm #683389Hey 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!
BasilisSeptember 7, 2016 at 11:18 pm #683420Hi 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,
RyanSeptember 8, 2016 at 12:35 am #683433I am also wondering why it’s not displaying alphabetically properly. I have set the order by ‘Title’ and ‘Ascending’.
Thanks in advance
RyanSeptember 12, 2016 at 4:08 am #684861Hey
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,
IsmaelSeptember 12, 2016 at 8:14 pm #685338Hi 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,
RyanSeptember 12, 2016 at 9:03 pm #685359Hey!
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!
BasilisSeptember 12, 2016 at 9:22 pm #685368Thanks Basilis! okay good to know.
September 14, 2016 at 6:18 am #686145 -
AuthorPosts
- You must be logged in to reply to this topic.