Title: insert shortcode into a html custom block
Last modified: March 11, 2019

---

# insert shortcode into a html custom block

 *  [phantam](https://wordpress.org/support/users/phantam/)
 * (@phantam)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/insert-shortcode-into-a-html-custom-block/)
 * Hello,
 * I want to insert shortcode into my custom html. I write it like this:
 *     ```
       <div class="jirei-post-list">
               [pt_view id="bb8f40f3lv"]
           </div>
       ```
   
 * or
 *     ```
       <div class="jirei-post-list">
               <?php echo do_shortcode("[pt_view id=bb8f40f3lv]"); ?>
           </div>
       ```
   
 * But it didn’t show. is there any way to insert it?
 * Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Content Views](https://wordpress.org/support/users/pt-guy/)
 * (@pt-guy)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/insert-shortcode-into-a-html-custom-block/#post-11301422)
 * Hi there,
    The second code is correct. Where did you put the code? Best regards,
 *  Thread Starter [phantam](https://wordpress.org/support/users/phantam/)
 * (@phantam)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/insert-shortcode-into-a-html-custom-block/#post-11301845)
 * Hi,
    I use custom html function in Elementor Plugin. I have already put the second
   code above to the custom html block, but it didn’t work.
 * what’s wrong with it?
 *  Plugin Author [Content Views](https://wordpress.org/support/users/pt-guy/)
 * (@pt-guy)
 * [7 years ago](https://wordpress.org/support/topic/insert-shortcode-into-a-html-custom-block/#post-11325157)
 * Thank you for your reply.
    The custom HTML element of that plugin might not support
   shortcode or PHP code. Please try another element (for example “Text Editor” 
   element), then add:
 *     ```
       <div class="jirei-post-list">
               [pt_view id="bb8f40f3lv"]
           </div>
       ```
   
 * Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘insert shortcode into a html custom block’ is closed to new replies.

 * ![](https://ps.w.org/content-views-query-and-display-post-page/assets/icon.svg?
   rev=2932226)
 * [Content Views - Post Grid & Filter, Recent Posts, Category Posts ... (Shortcode, Gutenberg Blocks, and Widgets for Elementor)](https://wordpress.org/plugins/content-views-query-and-display-post-page/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-views-query-and-display-post-page/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-views-query-and-display-post-page/)
 * [Active Topics](https://wordpress.org/support/plugin/content-views-query-and-display-post-page/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-views-query-and-display-post-page/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-views-query-and-display-post-page/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Content Views](https://wordpress.org/support/users/pt-guy/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/insert-shortcode-into-a-html-custom-block/#post-11325157)
 * Status: not resolved