- This topic has 9 replies, 2 voices, and was last updated 4 years ago by
David.
-
AuthorPosts
-
May 16, 2019 at 10:44 pm #902146
Marc Witschi
I’d like to display a different phone number and e-mail address in the footer on each page of my website.
https://ibb.co/0rLCXTwDo you know any possibility to do this?
Thank you in advanceMay 17, 2019 at 3:45 am #902378David
StaffCustomer SupportHi there,
you could use a WP custom field:
https://codex.wordpress.org/Custom_Fields
And then create a simple shortcode to display it, which i provide here:
https://generatepress.com/forums/topic/create-shortcode/#post-895056
May 17, 2019 at 4:29 am #902416Marc Witschi
I use pages, not posts. I think then I’m not able to use WP custom fields, or am I?
May 17, 2019 at 4:48 am #902427David
StaffCustomer SupportCustom fields work on pages also.
May 17, 2019 at 5:31 am #902483Marc Witschi
I think I don’t get it with those custom fields. I have no idea where to create them and where to put them…
I found a way on the internet where I should create different footer.php an then select them with an if/else-if/else in the page.php
https://www.wphub.com/blog/posts/show-different-footer-wordpress-pages/I tried but didn’t understand how the footer.php works. I couldn’t find where to put text, where to format, and and and ….
I’m pretty confused, can you explain me one (or both) options above?May 17, 2019 at 5:33 am #902485David
StaffCustomer SupportHow many different phone numbers will there be ? Are there a lot of pages with different numbers?
May 17, 2019 at 5:36 am #902489Marc Witschi
There will be total 5 different phone numbers and also 5 different e-mail-addresses.
Means there are three pages (+3 subpages) with the same number/mail and then always one page (+1 or +2 subpages) with a different number/mail.May 17, 2019 at 5:48 am #902511David
StaffCustomer SupportMay be simplest to use the Hook Element to add the markup to your page:
https://docs.generatepress.com/article/hooks-element-overview/
Use the
Footer
hook and you can disable the site footer.Then use the current markup like so:
<footer class="site-info" itemtype="https://schema.org/WPFooter" itemscope=""> <div class="inside-site-info grid-container grid-parent"> <div class="copyright-bar"> <p>Kinderheim Friedau ' Bern-Zürichstrasse 28 ' 3425 Koppigen ' Telefon <a href="tel:+4134 413 11 37">034 413 11 37</a> ' Fax <a href="#" style="color:white" class="inactiveLink">034 413 11 38</a></p> <p><a href="mailto:mail@kinderheimfriedau.ch">mail@kinderheimfriedau.ch</a> ' PC: <a href="#" style="color:white" class="inactiveLink">CH68 0900 0000 3400 1670 8</a> ' UBS: <a href="#" style="color:white" class="inactiveLink">CH02 0026 2226 7F68 0234 2</a></p> </div> </div> </footer>
The Display Rules tab will allow you to select which pages you want it displayed on. Then just create a new Hook for each of the different versions and set the different display rules.
May 17, 2019 at 5:57 am #902521Marc Witschi
Thank you very much!!!
May 17, 2019 at 6:22 am #902540David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.