New Landing How can we help? Themeforest Theme Support Dante does DANTE support custom post types?

Viewing 15 posts - 1 through 15 (of 43 total)
  • Posted in: Dante
  • #34062
    neotemplates
    Member
    Post count: 2

    i want to show my custom post types “books” in a grid view, or in masonry… how can i archieve this? also i want to change the layout a little bit, so that i also can display the “author” of the books directly below the title of the custom post type item in the masonory or grid view…. how can i do this? thanks

    #34212
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @neotemplates,

    As it currently stands, Dante doesn’t support using it’s page builder elements for custom post types out the box.

    However, you could definitely re-purpose the page builder assets to suit your custom post types, and add those elements to the page builder for you to use, through the child theme. That would give you ultimate flexibility over the content you are able to display.

    We’ve got it on our list to investigate the best way to allow custom post type usage within the blog assets, but a lot of the time it’s much cleaner to create a new asset.

    Hope that helps, I know it’s not too in-depth, but something like that is likely what we’ll write a knowledgebase article covering soon!

    Thanks,

    – Ed

    #34980
    neotemplates
    Member
    Post count: 2

    ok thanks for your answer, how do i create a new asset?

    #35312
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    You can create a new asset by adding a file to your child theme, copying from any of the page builder asset files from /swift-framework/page-builder/builder/shortcodes/ .

    You’ll then want to add the following function the child theme functions.php file:

    function register_new_pbassets() {
    	require_once( get_stylesheet_directory_uri() . '/custom-shortcode.php' );
    }
    if (is_admin()) {
    	add_action('admin_init', 'register_new_pbassets', 2);
    }
    if (!is_admin()) {
    	add_action('wp', 'register_new_pbassets', 2);
    }

    I’ll be writing up a knowledgebase article for this in the coming weeks!

    – Ed

    #37028
    abeldb
    Member
    Post count: 77

    Ooooh….

    It Sounds great!!

    Do you have more information of this issue?

    Thanks very much

    #37481
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Not yet, but will write it up as soon as I get the chance!

    – Ed

    #69238
    gab213
    Member
    Post count: 35

    +1 for me too.

    #69347
    Mohammad – SUPPORT
    Moderator
    Post count: 27441
    #79307
    msc-val
    Member
    Post count: 71

    I’m running into the same issue as the page builder doesn’t pull in the custom post type added through a plugin. I tried what Ed suggested in the previous response but it didn’t work for me.
    Can anybody further explain in details how I would go about fixing this? I appreciate any help I can get.
    Thanks!

    #79526
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @msc-val,

    Those are to add/remove assets. To add custom post types, edit /swift-framework/page-builder/builder/lib/builder.php lines 42/44 and add your post type there:

    if ($enable_pb_product_pages) {
                $this->postTypes = $pt_array ? $pt_array : array('page', 'post', 'portfolio', 'product', 'team', 'jobs', 'ajde_events',);
                } else {
                $this->postTypes = $pt_array ? $pt_array : array('page', 'post', 'portfolio', 'team', 'jobs', 'ajde_events');	            
                }

    Hope that helps.

    – Ed

    #79577
    msc-val
    Member
    Post count: 71

    Thank you @Ed for your response,
    That actually turned on the Swift Page Builder for this custom post type as it wasn’t available before. But this custom post type is still not supported by the theme since nothing is being outputted on the website.
    Here is my scenario. I use the Page builder to select recent posts or blog carousel, select the category that I want to display (which has plenty of content), then publish it but no content is being displayed. I can see the widget title that I assigned but nothing underneath it.
    Moreover, I published the Sitemap element from the Page Builder and it displays just the posts, pages, archive and categories. But it doesn’t show any of the custom post type content.
    I really appreciate any help I can get.
    Thanks again

    #79619
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    @msc-val ahh ok. Well, for custom post type content to be output using the page builder assets, you’d need to create your own assets. The original assets won’t pull in content from those, as of yet.

    – Ed

    #79620
    msc-val
    Member
    Post count: 71

    Thank you @Ed,
    Would you please clarify further. And please don’t spare me the details/steps of how I would go about creating the asset. It is a high priority for me as the whole content of the site is going to be created through this custom post type.

    Thank you so much!

    #79621
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @msc-val,

    I can’t go into too much detail of it, as it is outside the support scope (customisations), and I simply don’t have enough time – but I’ll say what I can.

    See the code here:

    function register_new_pbassets() {
        require_once( get_stylesheet_directory_uri() . '/custom-shortcode.php' );
    }
    if (is_admin()) {
        add_action('admin_init', 'register_new_pbassets', 2);
    }
    if (!is_admin()) {
        add_action('wp', 'register_new_pbassets', 2);
    }

    That is used to add your custom shortcode into the builder. You can then take any of the page builder shortcode files, duplicate it, and change the contents to match what you need. It’s a relatively moderate task for a developer with a bit of knowledge. If it’s not something you are competent with then it would be a pretty easy task for a freelancer.

    Hope that helps.

    – Ed

    #79651
    msc-val
    Member
    Post count: 71
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 43 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register