Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide page title on profile page only


  • antoinemayer
    Participant

    @antoinemayer

    Hi,

    My theme (Gridbox) is displaying a title on each page. I’d like to remove it from the profile page as the page title is the user’s username (which already appears in the header image section).

    Can someone help me getting rid of this?

    My WP version is 4.6.1.

    Thanks a lot,

    A. Mayer

Viewing 1 replies (of 1 total)

  • shanebp
    Moderator

    @shanebp

    Try this in your theme/functions.php

    function shanebp_the_title( $title, $id ) {
    
         if ( bp_is_user() ) 
    	 if ( $title == bp_get_displayed_user_fullname() )
    	     $title = '';
    
         return $title;
    	
    }
    add_filter( 'the_title', 'shanebp_the_title', 100, 2 );
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar