• Resolved Dnal

    (@dnal)


    Usually if I wanted to hide a page title (for example, if using a static page as the front page of my site) I could just remove code something like <h2><?php the_title() ?></h2> from page.php or make a new file, “homepage.php” which had the entire contents of page.php except for the title code.

    However, in the theme I’m editing, page.php looks like this:

    <?php
     /* Mystique/digitalnature */
     get_header();
    ?>
    
      <!-- main content: primary + sidebar(s) -->
      <div id="main">
       <div id="main-inside" class="clear-block">
        <!-- primary content -->
        <div id="primary-content">
         <div class="blocks">
           <?php do_action('mystique_before_primary'); ?>
           <?php
    
            if (have_posts()):
             while (have_posts()):
              the_post();
              mystique_page();
             endwhile;
            endif;
    
            comments_template();
           ?>
           <?php do_action('mystique_after_primary'); ?>
         </div>
        </div>
        <!-- /primary content -->
    
        <?php get_sidebar(); ?>
    
       </div>
      </div>
      <!-- /main content -->
    
    <?php get_footer(); ?>

    How can I remove the page title?

Viewing 4 replies - 1 through 4 (of 4 total)
  • In the page use custom fields: hide_title

    Thread Starter Dnal

    (@dnal)

    Thanks a lot, that worked great!

    Hi,

    I followed your instructions by putting a check mark in the “Custom Fields” box, then I located the “About” page and specified the Custom Field Name “About” and Custom Field Value “hide_title”, but it doesn’t work.

    I am using the Mystique theme ver 2.4.2 and I am having the same issue.

    I am so new to WordPress as your help is appreciated!

    Tom

    It works now! Many thanks!

    hide_title should be in both Name and Value fields.

    Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to remove page title when page.php doesn't contain title code’ is closed to new replies.