-
AuthorPosts
-
May 7, 2019 at 5:06 pm #1098126
Hey,
I’m trying to add multiple pages that shall append a last different section to a mostly common content. With that it will be easier to created multiple pages with same content but the last section differs and I’m also able to edit the common content above in one single page.
- To reach that goal I create a page based on Standard-Template
template-builder.php
, in the following calledBase Landingpage
. - Then I create multiple pages basing on a custom template
template-landingpage.php
and it’s content can be something different that shall be appended to the content ofBase Landingpage
- My custom template is a copy of
template-builder.php
with one small change. Before outputting the variable$content
I try to fetch my pageBase Landingpage
through it’s ID. I duplicated most of the code betweenget_header()
andget_footer()
. For the first duplicated code occurence I swapped theget_the_ID()
with my hardcoded ID.
It’s works nearly fine. I see the content of
Base Landingpage
and at its end I see the content of that new page usingtemplate-landingpage.php
.The problem I have is, that when calling a page with my custom template I can see some
<br/>
and<p>
that are not existent when callingBase Landingpage
. I can not understand why that happens.
Interesting is, that the breaks doesn’t appears everywhere, but e.g. in anone_half
column with three elements inside I got two<br />
s between them and when using the promobox the box title has amargin-top > 0
and the box itself has amargin-bottom > 0
because the CSS classavia-builder-el-no-siblings
is missing. Also the First headings inside sections has an unexpectedmargin-top
because the CSS classavia-builder-el-first
is missing.To be able to easily reconstruct that behavior simple add a new template (e.g. template-test.php) in a child theme or main theme. Put following code inside:
<?php /* Template Name: Landingpage Test */ require_once get_template_directory() .'/template-builder.php';
For my understanding this template should do the same like
Standard-Template
. But it isn’t.
So why are the autogenerated<br />
s and<p>
s only removed when using the frontpage?- This topic was modified 5 years, 6 months ago by algorhythm.
May 13, 2019 at 10:57 am #1100001Hey Martin,
Thank you for using Enfold.
Interesting what you want to do – but this is high customization and beyond the scope of support.
You will need to debug step by step to find out what causes the problem.
What you can try is to reset shortcode index to 0 and load the shortcode tree for your custom page (see function shortcode_handler_prepare how this can be done)
Hope this helps you.
Best regards,
Günter - To reach that goal I create a page based on Standard-Template
-
AuthorPosts
- You must be logged in to reply to this topic.