Filter for removing Post title hyperlinks

Community Forums Forums Design Tips and Tricks Filter for removing Post title hyperlinks

This topic is: not resolved

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Tom 5 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #101794

    webdev504
    Member

    My site is BrianTCook.com. I have a filter that’s removing the Post title links on the category page and I am trying to repurpose it to work on the middle widget area on the homepage.

    When I hover over the featured posts under – The Process – on the homepage, I want the to link straight to and not the individual post.

    Here is the filter I was trying to repurpose:

    
    add_filter( 'genesis_post_title_output', 'home_post_title_output', 14 );
     
    function home_post_title_output( $title ) {
     
    	if( is_home() )
    		$title = apply_filters( 'genesis_post_title_text', get_the_title() );
     
    		$wrap = 'h2';
     
    		//* Also, if HTML5 with semantic headings, wrap in H2
    		$wrap = genesis_html5() && genesis_get_seo_option( 'semantic_headings' ) ? 'h2' : $wrap;
     
    		//* Build the output
    		$output = genesis_markup( array(
    			'html5'   => "<{$wrap} %s>",
    			'xhtml'   => sprintf( '<%s class="entry-title">%s</%s>', $wrap, $title, $wrap ),
    			'context' => 'entry-title',
    			'echo'    => false,
    		) );
     
    		$output .= genesis_html5() ? "{$title}</{$wrap}>" : '';
     
    		return $output;
     
    }
    
    #103256

    Tom
    Participant
    Post count: 936

    Your site is 404 from your links. Also, your objective is unclear:

    I want the to link straight to and not the individual post.

    Link to … what?


    Choose your next site design from over 350 Genesis themes.
    Updates via GenesisThemes.ca | Twitter | Google+ | Tumblr

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.