WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Thirteen
[resolved] Remove commas between tags (10 posts)

  1. spongevan
    Member
    Posted 9 months ago #

    Hi,
    How can I remove the commas that separate the tags above the posts?
    Thank you in advance.

  2. esmi
    Forum Moderator
    Posted 9 months ago #

    Do not edit the Twenty Thirteen theme. It is the current default WordPress theme and having access to an original, unedited, copy of the theme is vital in many situations. First create a child theme for your changes. Or install a custom CSS plugin.

  3. spongevan
    Member
    Posted 9 months ago #

    Thank you for your response, esmi.
    I already created a child theme.
    I copied the lines from functions.php which are related to the tags and pasted them on my child theme.

    $tag_list = get_the_tag_list( '', __( ', ', 'twentythirteen' ) );
    	if ( $tag_list ) {
    		echo '<span class="tags-links">' . $tag_list . '</span>';
    	}

    Then I tried to remove the commas and save it but it didn't work.

    This is what my functions.php looks like before pasting the tags code.

    <?php
    //empty function.php
    function ws_credits () {echo '2013 © spongevan';}
    add_action('twentythirteen_credits', 'ws_credits');
    ?>

    What am I doing wrong?

  4. esmi
    Forum Moderator
    Posted 9 months ago #

    You have to create a new custom version of the relevant parent function within your child theme's functions.php file. You can't just drop in a few lines.

  5. spongevan
    Member
    Posted 9 months ago #

    Ok, thank you for replying.
    How can I create that specific custom version? I'm new at php, sorry.

  6. esmi
    Forum Moderator
    Posted 9 months ago #

    Which function in the parent theme are you trying to change?

  7. spongevan
    Member
    Posted 9 months ago #

    I think it's this one:

    function twentythirteen_entry_meta() {

  8. esmi
    Forum Moderator
    Posted 9 months ago #

    Copy the entire function (lines 322 - 349) into your child theme. Then you can start customising the child's version.

  9. spongevan
    Member
    Posted 9 months ago #

    It worked! Commas are removed.
    Thank you very much for your help!

  10. esmi
    Forum Moderator
    Posted 9 months ago #

    No problem. You should now be able to customise almost any part of the theme to your heart's content. :-)

Reply

You must log in to post.

About this Theme

About this Topic