WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Moving and changing entry footer-meta text. (6 posts)

  1. mightyminx
    Member
    Posted 1 year ago #

    I use the Twenty Twelve theme and am editing a corresponding child theme of it. I am wondering if I can change the entry footer-meta text (that says 'This entry was posted in Food, Recipes and tagged food, recipes on April 10, 2013' into something else, like "Posted on April 10, 2013 in Food and Recipes." If so, how can I do this? Thanks in advance!

  2. mar1965
    Member
    Posted 1 year ago #

    Hi mightyminx,

    The text you are referring to is located in the functions.php file within the function twentytwelve_entry_meta(). Follow this guide to create a child theme functions.php file to add a similar function with modified text according to your needs: Using Functions.php. Unlike the styles.css and template files, functions.php should not simply be copied to your child theme, something that I've made the mistake of doing in the past.

    The following post might also be of help: Twenty Twelve Meta Data.

  3. mightyminx
    Member
    Posted 1 year ago #

    Hi there and thank you so much for getting back to me! I have created a blank functions.php file in the child theme but I am not really sure what to add to it, even after reading that link D:

  4. cadfile
    Member
    Posted 1 year ago #

    mightyminx the post titled "Twenty Twelve Meta Data" gives a step by step instruction on how to change the text of the footer-meta.

    Just follow the steps in the last message of that post and it will show how to customize the text

  5. mar1965
    Member
    Posted 1 year ago #

    Hi mightyminx,

    To add to cadfile's advise above, in the blank functions.php file you can enter the following at the top:

    <?php

    After that, you can copy and paste the original function twentytwelve_entry_meta code which starts with the line:

    if ( ! function_exists( 'twentytwelve_entry_meta' ) ) :

    All the way until (and including) the following lines:

    printf(
    		$utility_text,
    		$categories_list,
    		$tag_list,
    		$date,
    		$author
    	);
    }
    endif;

    After pasting the code, look for the section of the code that starts with the comments:

    // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.

    and modify the text "This entry was posted in..." accordingly. After making the change, add the following closing PHP tag all the way at the bottom of the file:

    ?>

    and press Update File to save the child functions.php file. If you get a blank page, that means that you may have pasted something incorrectly; otherwise check a post on your site to see if the change took effect.

    If you do get a blank page after the file update, you may need to go to your hosting control panel's file manager or a file transfer program to delete the child functions.php file from the child theme folder and start over, or if your hosting control panel has a code editor, you can simply edit the file by deleting what you pasted, and go back to the WordPress Dashboard theme editor and start over.

  6. mightyminx
    Member
    Posted 1 year ago #

    Thank you both SO much but especially mar1965, you explained it perfectly and it worked!!

Topic Closed

This topic has been closed to new replies.

About this Topic