• Resolved gcoulby

    (@gcoulby)


    This is what I have so far and it’s not working.

    `<?php

    $get_title = the_title();

    if ( ! is_page_template( ‘page-templates/product-page.php’ ) ) {
    echo <h1 class=”entry-title”> . $get_title . </h1>
    }
    ?>`
    I want it to NOT display the title on that, template.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You’re not wrapping the echo’s HTML output in quotes or apostrophes.
    See https://php.net/manual/en/function.echo.php

    In future, please describe the issue more thoroughly other than, “not working”.

    Thread Starter gcoulby

    (@gcoulby)

    My apologies it was just the php syntax got me again.

    <?php
               if ( ! is_page_template( 'page-templates/product-page.php' ) ) {
             ?>
    
    		<h1 class="entry-title"><?php the_title(); ?></h1>
    
    	  <?php
    	  }
    	  ?>

    here was what I was wanting.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘if – is not [template] show title. how? PHP string?’ is closed to new replies.