Title: Removing title hyperlink
Last modified: August 20, 2016

---

# Removing title hyperlink

 *  Resolved [accretio](https://wordpress.org/support/users/accretio/)
 * (@accretio)
 * [14 years ago](https://wordpress.org/support/topic/removing-title-hyperlink/)
 * Hi, I need some help with editing the _function.php_ theme file.
    I would like
   to stop wordpress from hyperlinking the titles of my front pages.
 * Please tell me what to remove from this code in order to do so:
 *     ```
       **
        * Remove links from entry titles (shortcodes)
        *
        */
       function oxygen_entry_title_shortcode( $title ) {
   
       	global $post;
   
       	if ( is_front_page() && !is_home() ) {
       		$title = the_title( '<h2 class="' . esc_attr( $post->post_type ) . '-title entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>', false );
       	} elseif ( is_singular() ) {
       		$title = the_title( '<h1 class="' . esc_attr( $post->post_type ) . '-title entry-title">', '</h1>', false );
       	} elseif ( 'link_category' == get_query_var( 'taxonomy' ) ) {
       		$title = false;
       	} else {
       		$title = the_title( '<h2 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>', false );
       	}
   
       	/* If there's no post title, return a clickable '(Untitled)'. */
       	if ( empty( $title ) && !is_singular() && 'link_category' !== get_query_var( 'taxonomy' ) )
       		$title = '<h2 class="entry-title no-entry-title"><a href="' . get_permalink() . '" rel="bookmark">' . __( '(Untitled)', 'origin' ) . '</a></h2>';		
   
       	return $title;
       }
       ```
   
 * Please help me out here guys, I’m really having trouble with this.
 * Thanks

Viewing 1 replies (of 1 total)

 *  [Paweł Knapek](https://wordpress.org/support/users/adpawl/)
 * (@adpawl)
 * [14 years ago](https://wordpress.org/support/topic/removing-title-hyperlink/#post-2722288)
 *     ```
       if ( is_front_page() && !is_home() ) {
       $title = the_title( '<h2 class="' . esc_attr( $post->post_type ) . '-title entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>', false );
       }
       ```
   
 * change to
 *     ```
       if ( is_front_page() && !is_home() ) {
       $title = the_title( '<h2 class="' . esc_attr( $post->post_type ) . '-title entry-title">', '</h2>', false );
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Removing title hyperlink’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [hyperlink](https://wordpress.org/support/topic-tag/hyperlink/)
 * [remove](https://wordpress.org/support/topic-tag/remove/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Paweł Knapek](https://wordpress.org/support/users/adpawl/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/removing-title-hyperlink/#post-2722288)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
