-
AuthorPosts
-
August 9, 2018 at 9:48 am #995328
Hello, I am working on a website and I want the titles of a menu to be shown in the header. I hope I explain this right and you understand my problem.
An example:
I have a website with a menu with 3 menu sub items.
If I click on one of those sub items, I want the topic to be shown in the header. (In the center and in black font color) (And responsive, I don’t want this in the mobile version)I think it’s possible to manage this with php but i don’t know how. Can you help me?
thanks
- This topic was modified 6 years, 3 months ago by stephanknauf.
August 9, 2018 at 10:17 am #995347you can use a filter for it – or use a header-widget but
without seeing your site and logo it is hard to give exact settings for you.August 9, 2018 at 4:56 pm #995601Hi stephanknauf,
Could you please attach some screenshots of the issue?
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaAugust 10, 2018 at 10:36 am #995896This reply has been marked as private.August 10, 2018 at 5:01 pm #996070Hi stephanknauf,
Try the code like this
add_filter('avf_logo_subtext', 'kriesi_logo_addition'); function kriesi_logo_addition($sub) { $sub .= '<h3 class="bloginfo">'. wp_title() .'</h3>'; return $sub; }
If you need further assistance please let us know.
Best regards,
Victoria- This reply was modified 6 years, 3 months ago by Victoria.
August 13, 2018 at 9:20 am #996587I tried this code and this happened: (Screenshot down below) The menu sub items are shown in the header (visible only if marked) but not in the center. I tried to move it but no luck :(. I also need it in font color black and without this weird character in front of the items (Shown on the screenshot below).
And I don’t want that in the mobile Version of this Website. How can I prevent that it’s shown in the mobile version?
Thank you
August 13, 2018 at 5:27 pm #996776Hi stephanknauf,
Did you remove the code?
Maybe you should really use the header widget and try to run code there
https://firstsiteguide.com/run-php-code-text-widget-wordpress/
Best regards,
VictoriaAugust 17, 2018 at 10:58 am #998360It worked with the header widget! Thanks.
August 17, 2018 at 3:00 pm #998475 -
AuthorPosts
- You must be logged in to reply to this topic.