-
AuthorPosts
-
September 30, 2014 at 6:48 am #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,
– CJOctober 1, 2014 at 5:14 am #327841Hi 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,
DevinOctober 1, 2014 at 1:28 pm #328031Hi 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,
– CJOctober 2, 2014 at 6:45 am #328668Hey 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!
JosueOctober 5, 2014 at 12:19 am #330345Hi 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,
– CJOctober 5, 2014 at 3:00 am #330364Hi,
Can you please create us a WordPress administrator account? post it here as a private reply.
Regards,
JosueOctober 5, 2014 at 6:36 am #330374This reply has been marked as private.October 5, 2014 at 3:05 pm #330484I’m trying to get this to work. Has the code changed?
October 6, 2014 at 4:43 am #330696Hi!
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!
JosueOctober 6, 2014 at 4:58 am #330699Hi 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,
– CJOctober 7, 2014 at 4:00 am #331328Hi!
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,
IsmaelAugust 24, 2016 at 2:35 pm #676982This 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.
August 26, 2016 at 4:27 am #677901Hello!
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,
JosueAugust 28, 2016 at 4:37 pm #678663Thank 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.
August 28, 2016 at 10:15 pm #678690Hi,
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,
JosueDecember 13, 2016 at 1:13 am #723480Hi 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.
December 16, 2016 at 1:54 pm #725301Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.