• Resolved felapart

    (@rdallas4pm)


    >>moved from wp show post topic.

    Hello again, Tom)

    I need to remove sitelink to home page from title (i have my site title instead of logo) on particulare pages in navigation menu.
    Found some relevant topics in forum and tried to implement code from your answers but it didnt help https://generatepress.com/forums/topic/remove-logo-link/.

    Tried to edit navigation and heares templates but it didnt help either.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Leo

    (@leohsiang)

    Hi there,

    Give this PHP snippet a shot:

    add_filter( 'generate_site_title_output', 'lh_remove_title_link' );
    function lh_remove_title_link() {
    	return sprintf(
    		'<%1$s class="main-title" itemprop="headline">
    					%3$s
    		</%1$s>',
    		( is_front_page() && is_home() ) ? 'h1' : 'p',
    		esc_url( apply_filters( 'generate_site_title_href', home_url( '/' ) ) ),
    		get_bloginfo( 'name' )
    	);
    }

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Let me know ??

    Thread Starter felapart

    (@rdallas4pm)

    Hi, Leo! Thank you! Works like charm)

    Leo

    (@leohsiang)

    No problem ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘remove sitelink from title page in navigation menu’ is closed to new replies.