WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Dont want the Page name to be displayed (4 posts)

  1. shdaniyal
    Member
    Posted 1 year ago #

    this the site im working on ..Mantra theme---->oasis.pk

    I Dont want the *HOME* Page name ,written above the slider ,to be displayed on the front page..I want to remove it , in a way that the page is not deleted...
    how can I do that ?? .... I want to remove it in a way so that no link is formed in Pages section (left sidebar)...plz help

  2. Jonathan Dingman
    Member
    Posted 1 year ago #

    Not quite clear on what you're asking for. Can you try rephrasing it?

  3. linux4me2
    Member
    Posted 1 year ago #

    A quick and easy way would be to add the following CSS to your style.css:

    .entry-title {
      display: none;
    }

    What that does is set the CSS for the class "entry-title" so that it does not display, but this would affect more than just your front page.

    If you just want to eliminate the "Home" on your front page, take a look at the code that begins on line 13 of /wp-content/themes/mantra/content-page.php:

    <?php if ( is_front_page() ) { ?>
      <h2 class="entry-title"><?php the_title(); ?></h2>
    <?php } else { ?>
      <h1 class="entry-title"><?php the_title(); ?></h1>
    <?php } ?>

    You could comment out the line to output the title on the front page like this:

    <?php if ( is_front_page() ) {
      //echo '<h2 class="entry-title">' . the_title(); . '</h2>';
    <?php } else { ?>
      <h1 class="entry-title"><?php the_title(); ?></h1>
    <?php } ?>

    If the Pages widget doesn't have a setting to exclude the Home page, to remove the "Home" from the menu in the Pages section in the left sidebar, you could use something like the plugin Exclude Pages and see if that works, but I think you would need to create a page called "Home," exclude it, and assign it as your front page, which might be more trouble than it's worth.

    An alternative would be to create a custom menu, include all pages but your home page, and create a Custom Menu widget with it to replace the current "Pages" widget.

  4. shdaniyal
    Member
    Posted 1 year ago #

    thank you for your rply linux4me2..that was helpful :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags