WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to rename/define/change standard section headers (7 posts)

  1. fanfanfan
    Member
    Posted 5 years ago #

    On my front page above the excerpts of my recent posts it's written "Recent Posts", formatted by the .section-header class in the styles.css file.

    I can change colour, size etc. but I have no idea where to change the words of this title. I want to to be "Latest News" or else instead of "Recent Posts".

    Any ideas how or where to do that?

    FYI: I'm using the "Options" theme.

    Thanks in advance

  2. Ben Sutcliffe
    Member
    Posted 5 years ago #

    Any chance of a link? This will be called from index.php. If you can use a find tool "<Ctrl>+<F>" you can use this to find "Recent Posts" and change it to "Latest News". It will either be written out as <hN>This</hN> or <hN><?php _e("Recent Posts"); ?></hN> where N is 1, 2, 3 or 4. There may not be an <hN> but there will be a <div class="section-header"> preceding it.

  3. fanfanfan
    Member
    Posted 5 years ago #

    I did that already, a search through nearly all of the files in my theme, and didn't find any "Recent Posts" to replace. It's got the class of "section-header", defined in the styles.css:

    .section-header {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    padding: .5em 1.5em;
    margin: 0 0 3px 0;
    height: 15px;
    background: url(images/section-star.gif) no-repeat left .5em;
    }

    Maybe it's possible to define there something concrete for the excerpts on the front page? My page in work is http://ethrill.net/wordpress

    The index.php in the Options theme consists of:

    <?php /* What WordPress themes should be like. */ ?>

    and nothing more.

    Thanks in advance.

  4. Ben Sutcliffe
    Member
    Posted 5 years ago #

    In your source code the following is printed:
    <h2 class="section-header">Recent Posts</h2>

    Rather than index.php look for a homepage template such as main.php, hometemp.php or home.php. Somewhere the text will be printed out - it won't be in the CSS as that doesn't control the text, only what it looks like and the little star icon.

  5. fanfanfan
    Member
    Posted 5 years ago #

    None of the theme's files contain "Recent".

    Maybe it's in the "Recent" widget or the "Excerpts" plugin?

  6. fanfanfan
    Member
    Posted 5 years ago #

    I found it out !
    It was in the includes/excerpts.php !
    Thanks for your time!

  7. Ben Sutcliffe
    Member
    Posted 5 years ago #

    Good. Not sure what post-sections.php was referring to then. Revert to the original of post-sections.php for safety's sake then.

    Yours,
    Ben

Topic Closed

This topic has been closed to new replies.

About this Topic