Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #327025

    Hi,
    I created Custom Post Types but don’t know how to display CPT list using ALB. The Blog/Post/Portfolio elements do not show the Taxonomy for my CPT. Could you show me how?

    Thanks,
    – CJ

    #327841

    Hi bemofunny!

    Did you also set up/attach the taxonomy of your CPT to your CPT? The elements that allow you to choose any post type get that information from the taxonomy.

    Regards,
    Devin

    #328031

    Hi Devin,
    Yes I have. However, I think when I setup my CPT, I specifically didn’t register the generic taxonomy Post Categories to be used by my new CPT since I wanted it to have its own Taxonomies. Is that the reason why it didn’t show up in the list of Post Type Category while using ALB? I assume, there must be a code to register this some where in your theme?
    Thanks,
    – CJ

    #328668

    Hey Cj!

    Try adding this at the very end of your theme / child theme functions.php file:

    add_theme_support('add_avia_builder_post_type_option');
    

    Cheers!
    Josue

    #330345

    Hi Josue!
    This seems to work before but no longer available after I upgraded to WP 4.0 and Enfold 3. I am using child theme. Is there something I have to do differently now?
    Thanks,
    – CJ

    #330364

    Hi,

    Can you please create us a WordPress administrator account? post it here as a private reply.

    Regards,
    Josue

    #330374
    This reply has been marked as private.
    #330484

    I’m trying to get this to work. Has the code changed?

    #330696

    Hi!

    Those three taxonomies are available in the list – http://i.imgur.com/trWcLBn.png

    Afaik it’s not possible to select more than one taxonomy at the same time.

    Cheers!
    Josue

    #330699

    Hi Josue,

    Let’s think for a moment from user experience point of view. I have a CPT with 3 Taxonomies. What that means is I have a CPT that categorized into 3 groups. Yes? So I want to select to display 1. My CPT and 2. All of the 3 Groups. You could do that if it’s the built in Post Type. I could do that before upgrade to new version of Enfold. So what was the reason it got changed. I assume there is a good reason and perhaps a new better way of accomplishing things.

    But this is how I do it now and please correct me if I am wrong.
    1. I have to select “Display entries from custom taxonomy”
    2. Now select the CPT
    3. Then I have to select a “single” taxonomy. WHY??
    I think I am missing something here because it just doesn’t make any sense the workflow I have to follow and couldn’t even accomplish what I use to do easily.

    Thanks,
    – CJ

    #331328

    Hi!

    Actually, it always work that way before. Not sure how you accomplish selecting more than one taxonomy before. The option was blog posts or custom taxonomy. If custom taxonomy is selected, a new select element will display listing the taxonomies from posts or custom post types that are available. You can only select one of these taxonomies.

    Regards,
    Ismael

    #676982

    This works great:

    add_theme_support('add_avia_builder_post_type_option');

    But I want use the Portfolio Grid component with pages (post_type=page), and to show only the subpages of the page Im adding the portfolio grid. Only direct descendants.

    Is it possible ?

    Thanks.

    #677901

    Hello!

    You can hook into avia_post_grid_query to add an additional parameter like:

      function custom_post_grid_query( $query, $params ) {
        global $post; 
        $query['post_parent'] = $post->ID;
        return $query;
      }
      add_filter( 'avia_post_grid_query', 'custom_post_grid_query', 10, 2);
    

    So the grid will only show items that are child of the displayed Page.

    Regards,
    Josue

    #678663

    Thank for your reply Josue,

    I’d also like to add a select box into the component to be able to choose the parent page among all pages (not only the page the component is inserting into).

    I’ve been playing with the class

    avia_sc_portfolio in the file config-templatebuilder/avia-shortcodes/portfolio.php

    adding this code around line 213:

    $pages = array(
    	 "name"    => __("Parent page", 'avia_framework' ),
    	 "desc"    => __("Select the parent page", 'avia_framework' ),
    	 "id"      => "post_parent",
    	"type"    => "linkpicker", 
    	 "fetchTMPL"	=> true,
    	 "subtype" => array(
    		__('This page', 'avia_framework' ) =>'',
    		__('Single Entry', 'avia_framework' ) =>'single'
    	),
    	  "std" 	=> "",
     );
    array_unshift($this->elements, $element, $pages);

    This snippet has allowed me to add a select box in the visual component to dinamically select the parent page. But I don’t know how use this new field to filter the pages displayed.

    The question is, how to make it working, and how to do it in the child theme so we can upgrade ENFOLD without losing modifications?

    Thanks in advance.

    #678690

    Hi,

    If you check the filter code i posted, you’ll note you also got the $params variable to play with so you can make a conditional to check if a custom Page was set an assign it:

    $query['post_parent'] = $params['post_parent'] ? $params['post_parent'] : $post->ID;
    

    Regarding having this on a child theme:

    Best regards,
    Josue

    #723480

    Hi Josue, I have this working fine:

    add_theme_support( 'add_avia_builder_post_type_option' );
    add_theme_support( 'avia_template_builder_custom_post_type_grid' );

    But I want to insert Portfolio Grid component to display Courses created with Woo’s Sensei.

    Course Custom Post Type does not show in the list of available custom types.

    How can I fix it ? Thanks.

    #725301

    Hi,

    Unfortunately it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However if its really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Andy

Viewing 17 posts - 1 through 17 (of 17 total)
  • You must be logged in to reply to this topic.