• Hi team,
    I have 4 shortcode quiz category which I want to display in their respective post categories inside post paragraph. For eg. I have create quiz for fitness category so i want that particular quiz to be display in all the fitness posts which I have.
    So, is there any specific code which you can help me out with and make it successful?

Viewing 7 replies - 1 through 7 (of 7 total)
  • 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.

    Thread Starter nebadita

    (@nebadita)

    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

    Thread Starter nebadita

    (@nebadita)

    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.www.ads-software.com/reference/functions/do_shortcode/

    If that doesn’t work then the best place to ask is with the Ad Inserter plugin support.

    Thread Starter nebadita

    (@nebadita)

    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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Implement short code in specific post category’ is closed to new replies.