Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #499493

    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

    • This topic was modified 8 years, 7 months ago by Noonic_srl.
    #499530

    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

    #499531

    Hey!

    Cheers!
    Basilis

    #500277

    up

    #501342

    Hey!

    I still can not access the site.

    Regards,
    Basilis

    #524844

    I was looking for this also ..
    Is there any update on how we create custom templates for our custom post types?

    #524857

    Hey!


    @earthdog
    Replied you here – https://kriesi.at/support/topic/displaying-custom-post-type-with-custom-fields/. Please stick to your thread :)

    Regards,
    Yigit

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘custom post type templating with Avia’ is closed to new replies.