LazyBit replied
It works perfect, thank you.
Your snippet is working great. Now I need that after-content to not being generated on one or more specific posts. Is there a way to add a kind of exclusion-list to your snippet?
Great, now I can do it this way :)
Thank you for your patience, you rock!
... But I can't make it working with a more complex content. Example:
------------
Thank you for reading so far, now you have 2 options to donate:
See you!
------------
I don't know how to insert above html content in your code, everytime I try it breaks the snippet.
So far the best way I found is to convert the above html content to a shortcode using Shortcoder plugin and then insert the shortcode in the code you provided me this way:
function lazybit_thankyou_content($content) {
$fullcontent = $content;
if ( is_single() ) {
$after_content = '[sc name="after-post"]';
$fullcontent = $content.$after_content;
}
return $fullcontent;
}
add_filter('the_content', 'lazybit_thankyou_content');It works, but I would like to not using any external plugin. Any help?
It works great, thank you!
Hi dev,
I would like to automatically add to ALL past and future posts an html snippet in the end. I mean something like:
"Thank you for reading so far, please share and scroll down to see if there are more article you can be interested in, please donate" etc.
What's the best way to do that?
PS I setup this ticket as public because maybe can be interesting for someone else too.
Want to join this conversation or access attachments? Sign in first.
Open your ticket archive, review validated licenses, and continue product support conversations from one customer portal.