Title: CPT in Single Post
Last modified: January 11, 2022

---

# CPT in Single Post

 *  Resolved [sietssoo](https://wordpress.org/support/users/sietssoo/)
 * (@sietssoo)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/cpt-in-single-post/)
 * Hi all,
 * Currently the Single Post widget only supports the regular ‘Post’ but I also 
   want to choose at op my custum posts from my CPT. How can I do this?
 * I’m able to add css, codesnippets and change php.

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

 *  Plugin Contributor [Tarek Aziz](https://wordpress.org/support/users/tarekht/)
 * (@tarekht)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/cpt-in-single-post/#post-15242777)
 * Hello [@sietssoo](https://wordpress.org/support/users/sietssoo/)
 * Thank you very much for reaching out to us.
 * Unfortunately, this option is not available at this moment. We’ll try to implement
   this feature in the future update of our plugin.
 * Best regards,
    Support Team
 *  Thread Starter [sietssoo](https://wordpress.org/support/users/sietssoo/)
 * (@sietssoo)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cpt-in-single-post/#post-15297333)
 * Hi [@tarekht](https://wordpress.org/support/users/tarekht/),
 * I was scrolling in the ht-mega-for-elementor/includes/widgets/htmega_single_post.
   php
    Isn’t there a function where I can at my CPT to an array?
 * I would say something in rule 528 needs to be added.
    -  This reply was modified 4 years, 3 months ago by [sietssoo](https://wordpress.org/support/users/sietssoo/).
 *  Plugin Contributor [Tarek Aziz](https://wordpress.org/support/users/tarekht/)
 * (@tarekht)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cpt-in-single-post/#post-15304766)
 * Hello [@sietssoo](https://wordpress.org/support/users/sietssoo/)
 * Thanks a lot for your response.
 * Sorry to say that, but it is not available at this moment. We’ll take this into
   our consideration and try our best to implement this feature in one of the future
   versions of our plugin.
 * Kindest regards,
    Support Team
 *  Thread Starter [sietssoo](https://wordpress.org/support/users/sietssoo/)
 * (@sietssoo)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cpt-in-single-post/#post-15305716)
 * [@tarekht](https://wordpress.org/support/users/tarekht/) isn’t that just an easy
   answer. I won’t call it helping. Its just an auto message that your giving right
   now
 *  Plugin Contributor [HT Plugins](https://wordpress.org/support/users/htplugins/)
 * (@htplugins)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cpt-in-single-post/#post-15307187)
 * Hello [@sietssoo](https://wordpress.org/support/users/sietssoo/)
 * We are extremely sorry for the inconvenience you had.
 * Actually, we haven’t thought about adding support for CPT earlier. Thanks a lot
   for your valuable suggestion.
 * There is no function available right now where you can add your CPT to an array.
   That’s why it’s our earnest request to you to give us some time.
 * Best regards,
    Support Team
 *  Thread Starter [sietssoo](https://wordpress.org/support/users/sietssoo/)
 * (@sietssoo)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cpt-in-single-post/#post-15307329)
 * [@htplugins](https://wordpress.org/support/users/htplugins/) well that’s what
   we can call a honest reply.
    Thankyou.
 *  Plugin Contributor [HT Plugins](https://wordpress.org/support/users/htplugins/)
 * (@htplugins)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cpt-in-single-post/#post-15307396)
 * [@sietssoo](https://wordpress.org/support/users/sietssoo/) Thank you very much
   for your kind response 🙂
 *  Thread Starter [sietssoo](https://wordpress.org/support/users/sietssoo/)
 * (@sietssoo)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cpt-in-single-post/#post-15310775)
 * [@tarekht](https://wordpress.org/support/users/tarekht/) [@htplugins](https://wordpress.org/support/users/htplugins/),
 * Hi guys, I already found it by myself.
    Two changes had to be made.
 * **#1 ht-mega-for-elementor/includes/helper-function.php**
    To make sure CPT post
   can be selected as an option in elementor.
 * Original (line 217):
    `function htmega_post_name ( $post_type = 'post', $limit
   = 'default' ){`
 * Changed line (line 217):
    `function htmega_post_name ( $post_type = array('post','
   premium_content'), $limit = 'default' ){`
 * **#2 ht-mega-for-elementor/includes/widgets/htmega_single_post.php**
    To make
   sure widget loads the CPT.
 * Original (line 528):
    `'post_type' => 'post',`
 * Changed line (line 528):
    `'post_type' => array('post','premium_content'),`
 * After changing those two lines. CPTs can be selected in the single post widget.
 *  Plugin Contributor [Tarek Aziz](https://wordpress.org/support/users/tarekht/)
 * (@tarekht)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cpt-in-single-post/#post-15313627)
 * Hey [@sietssoo](https://wordpress.org/support/users/sietssoo/)
 * Great to know that you have managed to find a workaround solution to this issue.
 * Though it is done manually, it will fulfill your needs for the time being.
 * Thanks for sharing it with us. We’ll try to come up with a viable solution to
   implement this feature.
 * Kindest regards,
    Support Team

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

The topic ‘CPT in Single Post’ is closed to new replies.

 * ![](https://ps.w.org/ht-mega-for-elementor/assets/icon-256x256.png?rev=2924556)
 * [HT Mega Addons for Elementor - Elementor Widgets & Template Builder](https://wordpress.org/plugins/ht-mega-for-elementor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ht-mega-for-elementor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ht-mega-for-elementor/)
 * [Active Topics](https://wordpress.org/support/plugin/ht-mega-for-elementor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ht-mega-for-elementor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ht-mega-for-elementor/reviews/)

## Tags

 * [cpt](https://wordpress.org/support/topic-tag/cpt/)
 * [single post](https://wordpress.org/support/topic-tag/single-post/)

 * 9 replies
 * 3 participants
 * Last reply from: [Tarek Aziz](https://wordpress.org/support/users/tarekht/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/cpt-in-single-post/#post-15313627)
 * Status: resolved