WordPress.org

Ready to get started?Download WordPress

Forums

Removing page and post titles from Graphene (6 posts)

  1. ncfca
    Member
    Posted 1 year ago #

    Hi,

    I'm new here and have limited knowledge of Web coding. I'm trying to customize the Graphene theme and remove the page and post titles.

    I found a couple suggestions in the forums, and tried them without success. So far I edited the loop.php file by removing:
    <h2 class="post-title">
    " rel="bookmark" title="<?php printf(esc_attr__('Permalink Link to %s', 'graphene'), the_title_attribute('echo=0')); ?>"><?php if (get_the_title() == '') {_e('(No title)','graphene');} else {the_title();} ?>
    <?php do_action('graphene_post_title'); ?>
    </h2>

    and replacing it with:
    <?php if (!is_page()) : ?>
    <h2 class="post-title">
    " rel="bookmark" title="<?php printf(esc_attr__('Permalink Link to %s', 'graphene'), the_title_attribute('echo=0')); ?>"><?php if (get_the_title() == '') {_e('(No title)','graphene');} else {the_title();} ?>
    <?php do_action('graphene_post_title'); ?>
    </h2>
    <?php endif; ?>

    That didn't do anything. I then tried editing the custom CSS by going to: style.css and inserting:
    post-title, entry.title a {display:none;}

    Nothing happened. I don't know if I inserted it in the correct place or if that's even the correct file.

    Can you give me some direction?

    Thank you!

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Sorry I'm struggling to read code in text format, can you wrap your post's code using backticks or the button named, 'code' above your post textarea?

  3. ncfca
    Member
    Posted 1 year ago #

    Hi,

    I'm new here and have limited knowledge of Web coding. I'm trying to customize the Graphene theme and remove the page and post titles.

    I found a couple suggestions in the forums, and tried them without success. So far I edited the loop.php file by removing:

    <h2 class="post-title">
    " rel="bookmark" title="<?php printf(esc_attr__('Permalink Link to %s', 'graphene'), the_title_attribute('echo=0')); ?>"><?php if (get_the_title() == '') {_e('(No title)','graphene');} else {the_title();} ?>
    <?php do_action('graphene_post_title'); ?>
    </h2>

    and replacing it with:

    <?php if (!is_page()) : ?>
    <h2 class="post-title">
    " rel="bookmark" title="<?php printf(esc_attr__('Permalink Link to %s', 'graphene'), the_title_attribute('echo=0')); ?>"><?php if (get_the_title() == '') {_e('(No title)','graphene');} else {the_title();} ?>
    <?php do_action('graphene_post_title'); ?>
    </h2>
    <?php endif; ?>

    That didn't do anything. I then tried editing the custom CSS by going to: style.css and inserting:
    post-title, entry.title a {display:none;}

    Nothing happened. I don't know if I inserted it in the correct place or if that's even the correct file.

    Can you give me some direction?

    Thank you!

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    I recommend hiding them with CSS, check this article out
    http://css-tricks.com/places-its-tempting-to-use-display-none-but-dont/

    You'd want to put the CSS inside a Child Theme stylesheet or a Custom CSS plugin. Avoid editing the theme's original files as any changes made will erase once the theme updates.

  5. ncfca
    Member
    Posted 1 year ago #

    I'm sorry. I am very new at this and not a programmer at all. I installed a Custom CSS plugin, but have no idea what code to add to have it hide these items.

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.