Okay
  Public Ticket #3089080
Custom Query for Blog
Closed

Comments

  • desertedroad started the conversation

    I have a few CPTs.

    The post grid element allows me to choose a CPT, however, it doesn't offer the same layouts as the blog element. The blog element doesn't allow me to choose which post type I want to display. Instead, it assumes I want to display the default posts.

    How do I configure the blog element to show a different post type?

    I thought about creating a custom widget, but use the blog template provided. However, I'm not sure how to change the query that the custom element would use. 

    Can you please advise?

    Thanks!

  •  1,877
    Judith replied

    Hello There,

    Thanks for choosing salient.

    Please refer to this guide to customize the CPT :https://themenectar.com/docs/salient/metabox-cpt/.

    Thanks.

  • desertedroad replied

    That is not what I asked for at all. I don't want to add the page header meta box to my CPT.


    I want to add my CPT to the WPBakery Blog Element.

  •  1,877
    Judith replied

    Hi There,

    I apologize for missing out the point.

    Please allow me to escalate this to the developer to assist further.

    Thanks.

  •  1,070
    ThemeNectar replied

    Hey desertedroad!

    Currently, the blog element doesn't have a filter hook to override the query via a child theme, so you would need to copy the whole element template file to your child by using this method:  https://themenectar.com/docs/salient/overriding-salient-wpbakery-element-template-files-through-a-child-theme/  

    The template file is located at wp-content/plugins/salient-core/includes/vc_templates/nectar_blog.php. 

    -----

    In the next release, I'll also be adding a filter to the query args so that it can be more easily altered via the child theme. The filter will be called "nectar_blog_query".

    Kind regards,