WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Removing the parentheses that display around the 'read more' link. (6 posts)

  1. johnrpowell
    Member
    Posted 3 years ago #

    I'm noticing a discrepancy between what the codex states regarding the default display of the <!--more--> tag and what I'm seeing my WordPress install (v3.01) display. According to the codex, the default is supposed to be a 'more...' link immediately following the end of the truncated content. What actually displays is '(more...)'. If I specify custom text for the more link in the_content(), the custom text is also bookended by parentheses. None of the articles regarding customized formatting of the more link mention anything about these parentheses or how to remove them. Any help would be greatly appreciated.

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    This could be something that is being added by your current theme. By default, using something like <?php the_content('Here is the rest of the story');?> should just produce:

    post teaser text. Here is the rest of the story.

    No parentheses.

  3. johnrpowell
    Member
    Posted 3 years ago #

    If I replace that portion of the index.php file with any other content, no parentheses appear; there's nothing in the custom theme's styles or HTML inserting extra parentheses characters.

    This is how I'm currently placing the post's content into my theme...

    <p class="story"><?php the_content(); ?></p>

    In order to remove the default <p> tags that are inserted around the content, I have this placed near the top of the index.php document...

    <?php remove_filter ('the_content', 'wpautop'); ?>

    The <!--more--> tag yields this as the default more tag at the end of the post's content...

    (more...)

    If I change it to the following...

    <p class="story"><?php the_content('...'); ?></p>

    I get this...

    (...)

    There are no extra parentheses inserted around php hook in my php/html.

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    What you're seeing is the default more text. I'm not sure I understand the problem here...

  5. johnrpowell
    Member
    Posted 3 years ago #

    This is what the codex has to say about the default format of the <!--more--> tag:

    http://codex.wordpress.org/Customizing_the_Read_More#Designing_the_More_Tag

    It clearly states that the default rendering of the <!--more--> does not include the extra parentheses that I'm seeing appear.

  6. johnrpowell
    Member
    Posted 3 years ago #

    Nevermind...problem solved.

Topic Closed

This topic has been closed to new replies.

About this Topic