• Shan

    (@shan-last-shreds-of-sanity)


    I am designing a website for a client and they are using it as a stsic website. I need to remove the page titles from the individual pages, but not from the nav bar or the blog feature.

    I have looked at all of the other threads regarding this issue but the fixes either don’t work or I just don’t get it. Is there a way to just comment it out in the php somewhere?

    The test site is here: http://lighthouseinternetservices.com/Testing/

Viewing 15 replies - 1 through 15 (of 17 total)
  • In your page.php look for this code

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

    change that to

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

    all have done is add

    style=”display:none;”

    Thread Starter Shan

    (@shan-last-shreds-of-sanity)

    Thank you! Now this will only affect the page titles not the post titles, correct?

    Thread Starter Shan

    (@shan-last-shreds-of-sanity)

    Ok I don’t have any code similar to this in page.php

    Looking back at your css looks like the theme is using post title instead of entry title

    <h2 id="post-9" class="post-title">
    <a title="Permanent Link:" rel="bookmark" href="http://lighthouseinternetservices.com/Testing/accomodations/">Accommodations</a>

    you can not display them from layout.css

    .post-title {
    margin:0;
    padding:0;

    add
    display:none;

    Thread Starter Shan

    (@shan-last-shreds-of-sanity)

    Ok, that worked, but won’t that affect any blog post titles as well? I want to make sure this is only for the page titles. The client may want a blog in the future for news, etc. and with no titles, that would look bad.

    Will have to see what is used on blog page if it is same then will have alter the code all you have done is add that display:none; can always take out.

    Thread Starter Shan

    (@shan-last-shreds-of-sanity)

    Yes, I understand that. But should the client want a blog in the future, I will be back to the same problem of needing the page titles gone while keeping the post titles intact. LOL

    if you can create blog page so we can see as this is your testing website

    Thread Starter Shan

    (@shan-last-shreds-of-sanity)

    ok If you can take that display:none; out and if you can paste your index.php and page.php codes in http://wordpress.pastebin.com and submit paste url here so that we can see the code that creates that title on pages.

    Try this. In page.php, change this:

    <div <?php post_class(); ?>>
    
    <h2 class="post-title" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent Link:', 'zenlite');?>"><?php the_title(); ?></a></h2>
    <ul class="meta">

    to this:

    <div <?php post_class(); ?>>
    
    <?php if (is_page()) : ?>
    <h2 class="post-title" id="post-<?php the_ID(); ?>"><a>" rel="bookmark" title="<?php _e('Permanent Link:', 'zenlite');?>"><?php the_title(); ?></a></h2>
    <?php endif; ?>
    <ul class="meta">
    Thread Starter Shan

    (@shan-last-shreds-of-sanity)

    Ok here they are

    Page.php: http://wordpress.pastebin.com/xUUzNyve

    Index.php: http://wordpress.pastebin.com/n3k8ye2M

    @vtxyzzy I will try that. Give me a minute.

    Thread Starter Shan

    (@shan-last-shreds-of-sanity)

    OK that did not work.

    I get this as the title now:

    ” rel=”bookmark” title=”Permanent Link:”>Home

    Uggh.

    Try this looks like left out href in the code.

    <div <?php post_class(); ?>>
    
    <?php if (is_page()) : ?>
    <h2 class="post-title" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent Link:', 'zenlite');?>"><?php the_title(); ?></a></h2>
    <?php endif; ?>
    
    <ul class="meta">
    Thread Starter Shan

    (@shan-last-shreds-of-sanity)

    Nope. That didn’t work either.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘How Do I remove the Page Titles from Static pages?’ is closed to new replies.