Hi there,
if you’re looking to auto insert ( filter the_content ) shortcodes into your single posts of a specific category then i would recommend using the Ad Inserter plugin as that has all the features you require built in.
Hi David,
Thanks for your quick response.
basically I already had the short codes. But ad inserter plugin in not taking the short code. Thereby, please provide me any code like any function code, or html code or iframe code where I can insert that shortcode inside that actual code and place in the adinserter plugin.
ying
(@yingscarlett)
Hi @nebadita ,
Where exactly do you want to insert that shortcode?
Here’s the visual guide of GP hooks, let me know!
https://docs.generatepress.com/article/hooks-visual-guide/#single-post
Hi,
Thanks for the reply.
Basically I want to implement the short code in between paragraphs of my posts. So, I want a code for that.
I believe Ad Inserter has an option to inject PHP Codes which you could use with do_shortocde eg.
<?php echo do_shortcode( '[your_shortcode]' ); ?>
https://developer.ww.wp.xz.cn/reference/functions/do_shortcode/
If that doesn’t work then the best place to ask is with the Ad Inserter plugin support.
Hi David,
Thanks for your response. Can you help me with shortcode as link? LIke I want my shortcode to be in link form. For eg, if my shortcode is this [popup_anything id=”48067″] so, instead of short code how can I use this shortcode as a link form?
Leo
(@leohsiang)
Sounds like you just need to replace [your_shortcode] in David’s code with [popup_anything id="48067"]?
You would need to check with the plugin’s support team if you need further help with this as it’s not a question related to the free theme.
Thanks for your understanding.