• See text on this page:

    This entry was posted in Dentistry and tagged insurance on August 14, 2013.

    How to delete all text that’s bold?

    When I go into my dashboard to APPEARANCE>EDITOR>when that “style.css” (Edit Themes page opens), in upper right under “Templates”, it reads:
    This child theme inherits templates from a parent theme, Twenty Twelve.
    So where would I then navigate to? In essence, I have a customized theme

    I obviously did not customize this theme on my own so if someone has a clear and concise set of steps for me to follow in order to achieve the deletion of text from appearing underneath all my images, please let me know. Thank you very much.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You can create a child theme, add a functions.php file in it, and replace the following:

    from:

    $utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );

    to:

    $utility_text = __( '%1$s %2$s <span class="by-author"> by %4$s</span>.', 'twentytwelve' );

    Thread Starter Danno1

    (@danno1)

    I do have a child theme as I initially mentioned above. I did login to my account using: APPEARANCE>EDITOR>and on right side of page it shows a column and in the column I see ‘Theme Functions (functions.php) as you mention, and I click that and my ‘functions.php’ opens. However I scrolled up and down and see no php starting with the “$utility_text +_” etc. Am I in wrong one maybe? THANKS! (I am NOT intimidated!lol)

    Hmm, I can see it there. Did you do CONT+F and search “$utility_text” ?
    It is right under:

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

    @kaniamea – are these the instructions as to how to do this in a child theme functions.php file? A child theme functions file does not have a duplicate of the parent theme file.

    Thread Starter Danno1

    (@danno1)

    I did that CONT+F and searched “$utility_text” but results said “phrase not found” – wondering……….

    @danno1, ok, since you are using a child theme of Twenty Twelve do the following:

    So, create a brand new functions.php and save it in your child theme folder in wp-content/themes/YOUR THEME with the name “functions.php”. The content of this new file should include this:

    <?php
    
    function twentytwelve_entry_meta() {
    	// Translators: used between list items, there is a space after the comma.
    	$categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) );
    
    	// Translators: used between list items, there is a space after the comma.
    	$tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );
    
    	$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>',
    		esc_url( get_permalink() ),
    		esc_attr( get_the_time() ),
    		esc_attr( get_the_date( 'c' ) ),
    		esc_html( get_the_date() )
    	);
    
    	$author = sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
    		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    		esc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ),
    		get_the_author()
    	);
    
    	// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
    	if ( $tag_list ) {
    		$utility_text = __( '%1$s %2$s <span class="by-author"> by %4$s</span>.', 'twentytwelve' );
    	} elseif ( $categories_list ) {
    		$utility_text = __( 'This entry was posted in %1$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
    	} else {
    		$utility_text = __( 'This entry was posted on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
    	}
    
    	printf(
    		$utility_text,
    		$categories_list,
    		$tag_list,
    		$date,
    		$author
    	);
    }
    
    ?>

    This should be able to do what you need. In case you need to further modify this file you can do it from your Appearance => Editor => functions.php

    Hope this helps!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Eliminate specific text from post pages – how?’ is closed to new replies.