Title: Shortcode will not process using do_shortcode
Last modified: January 26, 2023

---

# Shortcode will not process using do_shortcode

 *  [Jeff Cohan](https://wordpress.org/support/users/jdcohan/)
 * (@jdcohan)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/shortcode-will-not-process-using-do_shortcode/)
 * I find that the content_block shortcode **will not process **(i.e., the shortcode
   code displays, not the return of the shortcode) in some situations when **custom
   shortcodes **I’ve created **DO process**.
 * For example, I created a Custom Post Type for which I want the Description (which
   appears at the top of the CPT archive page) to be created/edited by my client.
   So, instead of hardcoding the Description inside the function that registers 
   the CPT, I created a Content Block to store the CPT description. I added placeholder
   content.
 * I have a function that returns the description, which originally was this…
 *     ```wp-block-code
       function seba_directors_blurb() {
       	$output = '<p>This is a description of this CPT.</p>';
       	return $output;
       }
       ```
   
 * In the CPT registration function, I have this line…
 *     ```wp-block-code
       $args = array(
       	'label'  => __( 'SEBA Director', 'text_domain' ),
       	'description' => seba_directors_blurb(),
       	{etc.}
       ```
   
 * Then, after adding the Content Block for the CPT description, I altered the first
   function to be this…
 *     ```wp-block-code
       function seba_directors_blurb() {
       	$output = do_shortcode('[content_block id=1118]');
       	return $output;
       }
       ```
   
 * The result is that this appears on the front end:
 *     ```wp-block-code
       [content_block id=1118]
       ```
   
 * However, when I created a simple custom shortcode that returns placeholder text,
   it works.
 * I hope this makes sense. Any thoughts?

The topic ‘Shortcode will not process using do_shortcode’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-widget/assets/icon.svg?rev=2884166)
 * [Content Blocks (Custom Post Widget)](https://wordpress.org/plugins/custom-post-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-widget/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Jeff Cohan](https://wordpress.org/support/users/jdcohan/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/shortcode-will-not-process-using-do_shortcode/)
 * Status: not resolved