Tagged: CPT, custom fields
-
AuthorPosts
-
June 29, 2014 at 12:23 pm #285005
Hello,
i activated the avia layout builder on my custom post type “books”. That is working. At the same time i want to use for example the single-books.php template cause i also want to add some custom fields in it. like “Price, Author” etc. I created these custom fields in the plugin, and added it in the single-books.php. But when layout builder is activated for this custom post type. This template is not being used anymore. How can i make it, that both is using? layout builder and also being able to use custom fields…
thanks
June 30, 2014 at 3:04 pm #285188Hey neotemplates!
Thank you for using our theme.
A possible answer to your question you can find here:
https://kriesi.at/support/topic/portfolio-items-custom-fields/
If anything is unclear, don’t hesitate to contact us again.
Cheers!
GünterJune 30, 2014 at 3:49 pm #285228i understand it for the custom post type “portfolio” what is inbuilt in enfold theme. but how do it, for a complete own custom post type like “books” or products i created for example with the custom post type plugin “WP-Types” or another Custom post type plugin?
i need custom filelds but still using avia layout manager on it….
?
June 30, 2014 at 5:53 pm #285315Hi!
Take a look at this topic:
https://kriesi.at/support/topic/displaying-custom-post-types-inside-of-the-avia-layout-builder/
We currently do not support custom post types in the theme.
If you want to implement such a feature, it only can be done as an extension by a freelancer.
Best regards,
GünterJune 7, 2016 at 6:07 pm #644240Hi,
I’m having the same problem… have you fixed it? It has past near 2 years, and the problem remains unsolved…Thanks!
June 8, 2016 at 7:02 am #644571Hi,
Please refer to this article: http://kriesi.at/documentation/enfold/use-the-layout-builder-with-any-post-type/
Best regards,
RikardJune 8, 2016 at 8:59 am #644616Hi Rikard,
using another method I have activated the Avia Builder in a Custom Type called “Party”, that is not the problem, the single-party.php file is processed well. That’s the code I’ve added in the meta.php file:add_filter(‘avf_builder_boxes’,’custom_post_types_options’);
function custom_post_types_options($boxes)
{
$boxes[] = array( ‘title’ =>__(‘Avia Layout Builder’,’avia_framework’ ), ‘id’=>’avia_builder’, ‘page’=>array(‘party’), ‘context’=>’normal’, ‘expandable’=>true );
$boxes[] = array( ‘title’ =>__(‘Layout’,’avia_framework’ ), ‘id’=>’layout’, ‘page’=>array(‘party’), ‘context’=>’side’, ‘priority’=>’low’);
return $boxes;
}The problem is that when I use the advanced editor to add the contents, the single-party.php is not processed any more, and WP just processes the single.php file.
Can you tell me how to use de advanced editor and make the WP process my custom single-party.php?
Best Regards,
Boream.June 8, 2016 at 9:25 am #644633Hi again,
I also have tried with the snippet indicated in the article http://kriesi.at/documentation/enfold/use-the-layout-builder-with-any-post-type/, and happens the same. The same problem, when I use the Advanced Editor the single-party.php file is not processed any more…So I’m in the same situation, and I hope you can give me a solution.
Best Regards,
Boream.June 9, 2016 at 10:32 am #645348Hi,
The same problem, when I use the Advanced Editor the single-party.php file is not processed any more…
If you enable the advance layout builder for custom post types, it’s not going to use the “single” template. It’s going to use the template-builder.php file. If you need the single-party.php file to work, use the default editor.
Best regards,
IsmaelFebruary 9, 2018 at 2:41 pm #910269Got the same here: If a post is written with the advanced layout builder, the single.php is no longer called. My single.php is layouted again and shows pictures depending on the category, why it should be called.
If I now use this in template-builder.php in line 13:if (is_single ()) { include ('single.php'); exit; }
the single.php is called, but the content is a “read more”-link and not the layouted content.
How can this be solved?
TIA,
Andreas- This reply was modified 6 years, 9 months ago by A. Kempf.
February 12, 2018 at 2:42 am #910873Hi,
the single.php is called, but the content is a “read more”
What do you mean by “read more”? Again, you can’t use the advance layout builder if you want the plugins to have access to the default templates such as the single.php file. Please use the default editor.
Best regards,
IsmaelFebruary 12, 2018 at 7:23 pm #911280This is my solution in single.php, it starts at line 40:
//filter the content for content builder elements $content = apply_filters('avia_builder_precompile', get_post_meta(get_the_ID(), '_aviaLayoutBuilderCleanData', true)); if (!$content) { get_template_part( 'includes/loop', 'index' ); } else { //check first builder element. if its a section or a fullwidth slider we dont need to create the default openeing divs here $content = apply_filters('the_content',$content); $content = apply_filters('avf_template_builder_content',$content); $post_format = get_post_format() ?: 'standard'; $lf_class = implode(" ",get_post_class('post-entry post-entry-type-'.$post_format." ".$post_class." ".$with_slider))."' ".avia_markup_helper(array('context' => 'entry','echo' => false)); echo "<article class='".$lf_class.">"; echo '<div class="entry-content-wrapper clearfix standard-content">'; echo $content.'</div></article>'; }
February 13, 2018 at 7:22 am #911557Hi,
That’s interesting. Thanks for sharing. I’m sure it will help a lot of users. :)
Best regards,
IsmaelJuly 9, 2020 at 6:16 pm #1229226Hello,
with this https://kriesi.at/documentation/enfold/intro-to-layout-builder/#alb-for-any-post-type
Is it possible to use the avia layout builder also in the blog categories?Thanks!
July 11, 2020 at 4:23 am #1229514 -
AuthorPosts
- You must be logged in to reply to this topic.