Title: Programmatically Insert Code Block Pro Content Using Shortcode or Tag
Last modified: October 17, 2025

---

# Programmatically Insert Code Block Pro Content Using Shortcode or Tag

 *  [clientappeight25](https://wordpress.org/support/users/clientappeight25/)
 * (@clientappeight25)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/programmatically-insert-code-block-pro-content-using-shortcode-or-tag/)
 * Hi,
 * Is there any **shortcode option** or **tag option** available to programmatically
   insert content into the **Code Block Pro** plugin?
 * For example, I’d like to dynamically add code snippets like this:
 * `[code-block-pro]<span>..<span class="hljs-selector-class">.content</span>...
   <span class="hljs-selector-attr">[/code-block-pro]`
 * The goal is to create or update code blocks programmatically (via PHP or REST
   API) instead of manually adding them in the editor.
   Please let me know if the
   plugin provides a shortcode or another method to handle this.
 * Thanks!
    -  This topic was modified 7 months, 3 weeks ago by [clientappeight25](https://wordpress.org/support/users/clientappeight25/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Kevin Batdorf](https://wordpress.org/support/users/kbat82/)
 * (@kbat82)
 * [7 months, 2 weeks ago](https://wordpress.org/support/topic/programmatically-insert-code-block-pro-content-using-shortcode-or-tag/#post-18685434)
 * Hi,
 * Unfortunately because it processes the output as you type in the browser a shortcode
   won’t work. There’s no serverside or frontend rendering available.

Viewing 1 replies (of 1 total)

The topic ‘Programmatically Insert Code Block Pro Content Using Shortcode or Tag’
is closed to new replies.

 * ![](https://ps.w.org/code-block-pro/assets/icon-256x256.png?rev=2908978)
 * [Code Block Pro - Beautiful Syntax Highlighting](https://wordpress.org/plugins/code-block-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-block-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-block-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/code-block-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-block-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-block-pro/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kevin Batdorf](https://wordpress.org/support/users/kbat82/)
 * Last activity: [7 months, 2 weeks ago](https://wordpress.org/support/topic/programmatically-insert-code-block-pro-content-using-shortcode-or-tag/#post-18685434)
 * Status: not resolved