- This topic has 7 replies, 3 voices, and was last updated 7 months, 3 weeks ago by
David.
-
AuthorPosts
-
June 6, 2020 at 9:24 am #1317020
Bjørnar
Hi,
I have a site where I post music for download, and license. Using Generatepress and loving it! Great theme.
I have made a child theme, and added the following code to functions.php get it to show shortcodes and HTML in the excerpt. The front page should only show a little card, or excerpt if you will…
//Enable Shortcodes in WordPress Excerpts and Text Widgets. Add to functions.php add_filter( 'get_the_excerpt', 'my_shortcode_parser' ); function my_shortcode_parser( $excerpt ) { return do_shortcode($excerpt); }
So in the excerpt I want to have an audio player, button to the purchase page on sellfy, and a download MP3 button. This works on most of the blog posts. But on some, the link to sellfy is not visible. But if I inspect the code, I think its there. The audio player also looks different on some posts.
Probably me doing something wrong… but any suggestion on what to check why certain elements doesnt show up?
I have disabled caching, etc.
June 6, 2020 at 4:26 pm #1317328Leo
StaffCustomer SupportHi there,
I’m not sure unfortunately.
So you are using the custom excerpt metabox and adding shortcode to all of them?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 6, 2020 at 4:27 pm #1317330Bjørnar
Yes I use the custom excerpt box. I add both shortcodes, and HTML codes to sites like sellfy etc.
June 6, 2020 at 4:32 pm #1317337Bjørnar
Under the “Element 115” Excerpt I have added this code. In the excerpt box.
<a href="https://sellfy.com/p/tq9pti/" id="tq9pti" class="sellfy-buy-button" data-text="Pro License From"></a> <script src="https://sellfy.com/js/api_buttons.js"></script>
But it doesnt show the button (that code should generate) on the excerpt. But this code does work on the other excerpts before Element 115.
June 7, 2020 at 2:39 am #1317661Bjørnar
Seems like disabling “Infinite Scroll” fixed the issue.
June 7, 2020 at 7:08 am #1317879David
StaffCustomer SupportHi there,
looks like your script is only firing on an initial load – so it doesn’t load on elements that are Ajax Loaded like infinite scroll does.
I am not sure how to fix that – aside from not using Load More / Infinite scroll options.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 7, 2020 at 7:17 am #1317887Bjørnar
The important part is that we found out why the issue was happining. Now onto google to search for some coding tips.
Cheers. 🙂
June 7, 2020 at 9:55 am #1318189David
StaffCustomer SupportGlad to be of help
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.