-
AuthorPosts
-
March 18, 2016 at 5:25 pm #600434
Hi,
For one of my projects, I need to customize a template.
I would like to have two different templates which display a different footer.
Template A with footer A and template B with footer B.
Do you think this is possible ?I had a look in the Enfold files but I don’t know where to act… :(
Should I create two files : footer-a.php and footer-b.php ?
And in each one, should I replace
$footer = get_post_meta($the_id, 'footer', true);
by
$footer = get_post_meta($the_id, 'footer-a', true);
and
$footer = get_post_meta($the_id, 'footer-b', true);
on line 14 ?Ideally, I’d like to access these different footers from the backend.
Otherwise, I could change them by FTP.Thank you in advance for your answer and perhaps your help ;)
Best Regards,
BarbaraMarch 21, 2016 at 3:11 pm #601264Hey mika2000!
Thank you for using our theme.
The standard footer template used by WP is enfold\footer.php.
If you want to have seperate footers you have to split the output here.
Depending on the changes either with if(…) else (…) or you create subtemplates from that one and include these in a modified version of this file.
Regards,
GünterMarch 24, 2016 at 6:16 pm #603308Hi Günter,
thank you for your quick answer.
I think I understand the idea. Could you tell me if I’m right doing this :
1. I create a file named
template_example.php
which is the same as yourtemplate-builder.php
except that mine ends with the line<?php get_footer("example"); ?>
2. Then, I create a file namedfooter-example.php
which is the same as yourfooter.php
except on line 55 where I replace
if (function_exists('dynamic_sidebar') && dynamic_sidebar('Footer - column'.$i) ) : else : avia_dummy_widget($i); endif;
with
if (function_exists('dynamic_sidebar') && dynamic_sidebar('Footer - Name'.$i) ) : else : avia_dummy_widget($i); endif;
Thank you very much for your answer :)
Best Regards,
BarbaraMarch 25, 2016 at 10:45 pm #603748Hi!
Yes that seems to be a proper way to do it and your direction is correct.
You can go ahead and follow based on that.Please let us know if we can assist you with anything else.
Cheers!
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.