Tagged: , , ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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 5 years, 11 months ago by stephanknauf.
    #995347

    you 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.

    #995601

    Hi 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,
    Victoria

    #995896
    This reply has been marked as private.
    #996070

    Hi 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 5 years, 11 months ago by Victoria.
    #996587

    I 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

    #996776

    Hi 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,
    Victoria

    #998360

    It worked with the header widget! Thanks.

    #998475

    Hi,

    Great, glad you got it working. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.