Hi guys, I can’t really get my head around this.
I have created a page, which I styled using Avia. I want to use this as a template, to display all of my custom post type pages.
To do so, I’ve used variables in this format: $$variableName$$ in my “template”. I’ve then created a copy of “template-builder.php” and renamed it to “single-customposttype.php”, and I’ve edited this latter as follows:
...
setup_postdata( $post );
$content = get_post_meta(15, '_aviaLayoutBuilderCleanData', true); // Where 15 is the ID of my "template" page
$content = str_replace('$$name$$', get_the_title(), $content);
//filter the content for content builder elements
$content = apply_filters('avia_builder_precompile', $content);
...
this works, however I do not get the page rendered exactly as it would look if I open my “template” page. For example, one issue is that I have a first “color section” with a full-width background image, but even if I do the str_replace()
on that url, the image does not change.
Also, I have changed the header to look transparent, but the page does not get any of the layout settings.
is there a way to sove this? Or a better way to achieve this?
kind regards
Hi Noonic_srl!
You have done a lot of advanced customizations and really good work with that.
I have changed the IP but still not updates to me.
I will follow the post although here, so I can give my input.
Best regards,
Basilis
Hey!
Cheers!
Basilis
Hey!
I still can not access the site.
Regards,
Basilis
I was looking for this also ..
Is there any update on how we create custom templates for our custom post types?
Hey!
@earthdog Replied you here – https://kriesi.at/support/topic/displaying-custom-post-type-with-custom-fields/. Please stick to your thread :)
Regards,
Yigit