• Resolved srl_frontrange

    (@srl_frontrange)


    My php is very rusty.

    I created a static home page, but I want to remove the pesky entry-title from that page only, but still keep the Home link available in the menu.

    I figure I need an if statement to hug this bit?

    <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'your-theme'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>

Viewing 2 replies - 16 through 17 (of 17 total)
  • Until you understand the Loop and how it is implemented in your theme’s template files, you are going to find it very difficult to amend any page’s output. And as every theme is different, there’s no standard code I can suggest.

    LJagermaster

    (@the-living-legend)

    Would I be right in thinking the code you initially posted could be incorporated into the following ‘if’ statements (these are inside the index.php file)?:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I tried to edit it to achieve this but I can only make guesses as to which changes should be made, and so far those guesses are causing nothing but more errors and headaches. This is what I have so far:

    if( !is_front_page() ){
    			echo '<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'grunge-blood'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>';
    		}

    I’d placed it just above the Category if statement and changed the category “if” to “elseif” like the ones that proceed it… Any advice on this would also appreciated…

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘remove entry-title if {home page}’ is closed to new replies.