Posts element on Visual Composer didn't work with custom post type

This support request was posted in Smart by ahmadhajar

Request ID #33335 In Progress
  • Why Posts element on Visual Composer didn’t work with custom post type? It’s only work with post_type=post. Did I miss something?

    Andrés Villarreal

    Hi,

    Sorry for the delayed response, and thank you for writing. I hope you’re doing well.

    We’re currently investigating this issue, and we’ll get back to you as soon as we have a solution.

    Best,

    Andrés.

    Andrés Villarreal
    This reply has been marked as private.

    still doesn’t work, I already copy that code to my functions.php.

    Andrés Villarreal
    This reply has been marked as private.
    This reply has been marked as private.
    Andrés Villarreal

    Hi,

    I’m really sorry, I didn’t get that from your previous messages. What you’re trying to do is not supported natively by the theme, since we include a customized implementation for each post type we support. We are currently supporting only posts, pages, products (from WooCommerce), portfolio projects (from our Nice Portfolio plugin) and team members (from our Nice Team plugin).

    However, since you’re already using a Child Theme, adding a custom implementation for your own Custom Post Types should be relatively easy. If you just add the following code to your functions.php file, you will have your post types behaving just like the default “post” post type:

    Once you added that code, you will see two new groups of options at the bottom of the Modules tab when you’re adding a new Post component, one for each of your post types. Those options will let you control which elements will be displayed for each post type.

    Please bear in mind that any further modification or addition to this behavior would require some custom code of your own.

    Please let us know if this helps.

    Best,

    Andrés.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Login to your Account

Welcome back! Please log in to your account by filling the fields below:

Forgot?

Not a member? Create a free account.

Create a Free Account

You're 27 seconds away from some awesome WordPress free stuff, benefits and more. Create a free account and have access to our free products, benefits and more!

Already have an account? Log in
Secure Server