• Hi,

    I’ve created a twenty-ten child theme; I’m trying to remove the line which reads “Posted in ”| Comments Off “. As far as I understand, I need to remove the following function which is in functions.php file:

    function twentyten_posted_in() {
    	// Retrieves tag list of current post, separated by commas.
    	$tag_list = get_the_tag_list( '', ', ' );
    	if ( $tag_list ) {
    		$posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
    	} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
    		$posted_in = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
    	} else {
    		$posted_in = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
    	}
    	// Prints the string, replacing the placeholders.
    	printf(
    		$posted_in,
    		get_the_category_list( ', ' ),
    		$tag_list,
    		get_permalink(),
    		the_title_attribute( 'echo=0' )
    	);
    }

    I have search everywhere, including the Codex, to see how I can override or turn off the function in a child theme, but came away empty handed.

    I’d greatly appreciate it, if someone could point me in the right direction.

    Many thanks in advance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • No. You need to create your own customised twentyten_posted_in() function in your child theme’s functions.php file. The child’s version will be used automatically.

    Would this also work in style.css? .entry-utility-prep, .cat-links, .meta-sep {
    display:none;

    @bob cavanaugh: It is considered impolite to interrupt another poster’s ongoing thread unless you are posting a solution or suggestion. It causes significant problems for the forum’s volunteers and prevents us from being able to track issues by topic. Please post your own topic.

    Sorry maybe I should have worded my response a little differently, but that’s how I would have solved the OP’s problem.

    My bad. Your post referenced CSS and this is a function issue. Hence why I assumed that you were asking your own question.

    That makes sense. While wordpress.com and www.remarpro.com are very different, I figured the CSS code I posted above might hide that message like it does over at wordpress.com. If it doesn’t, it looks like I’ll have to take another look at my own child theme. If I find something wrong with style.css, I’ll post the new questions here

    Thread Starter LClark52

    (@lclark52)

    @esmi: Thank you for your response.

    I put the following code into functions.php of my child theme:

    function twentyten_posted_in() {
    }

    Assuming, that since the function has no values, it would return nothing; to my surprise, the line was still there.

    Any thoughts?

    Thank you.

    Thread Starter LClark52

    (@lclark52)

    @esmi: Thanks again for your help.

    I’ve also tried the following function in my child theme’s functions.php file; however, it did not work either.

    function twentyten_posted_in() {
    	return;
    }

    What am I doing wrong?

    Many Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to Remove twentyten_posted_in() function’ is closed to new replies.