Title: Implement short code in specific post category
Last modified: November 26, 2022

---

# Implement short code in specific post category

 *  [nebadita](https://wordpress.org/support/users/nebadita/)
 * (@nebadita)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/implement-short-code-in-specific-post-category/)
 * 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)

 *  [David](https://wordpress.org/support/users/diggeddy/)
 * (@diggeddy)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/implement-short-code-in-specific-post-category/#post-16236626)
 * 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](https://wordpress.org/support/users/nebadita/)
 * (@nebadita)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/implement-short-code-in-specific-post-category/#post-16236676)
 * 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](https://wordpress.org/support/users/yingscarlett/)
 * (@yingscarlett)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/implement-short-code-in-specific-post-category/#post-16237229)
 * Hi [@nebadita](https://wordpress.org/support/users/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](https://docs.generatepress.com/article/hooks-visual-guide/#single-post)
 *  Thread Starter [nebadita](https://wordpress.org/support/users/nebadita/)
 * (@nebadita)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/implement-short-code-in-specific-post-category/#post-16237709)
 * 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.
 *  [David](https://wordpress.org/support/users/diggeddy/)
 * (@diggeddy)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/implement-short-code-in-specific-post-category/#post-16237957)
 * 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.wordpress.org/reference/functions/do_shortcode/](https://developer.wordpress.org/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](https://wordpress.org/support/users/nebadita/)
 * (@nebadita)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/implement-short-code-in-specific-post-category/#post-16238002)
 * 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](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/implement-short-code-in-specific-post-category/#post-16238683)
 * 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.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

 * 7 replies
 * 4 participants
 * Last reply from: [Leo](https://wordpress.org/support/users/leohsiang/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/implement-short-code-in-specific-post-category/#post-16238683)
 * Status: not resolved