• Resolved joe smith

    (@joe-smith)


    under each post and also in within each post the meta says posted in “whatever category” and the date and author but the category , date and author appear as links. how do i un-link them?

Viewing 15 replies - 1 through 15 (of 52 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Is this regarding stuff in the dashboard?

    Thread Starter joe smith

    (@joe-smith)

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which theme is this?

    Thread Starter joe smith

    (@joe-smith)

    twenty twelve

    Twenty Twelve uses a function twentytwelve_entry_meta defined in theme’s functions.php file to display entry meta information. You can modify it to unlink the items you don’t want to be displayed as links.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Then you need to set up a Child Theme first: https://codex.www.ads-software.com/Child_Themes

    Then create a functions.php file in your Child Theme and add your modified twentytwelve_entry_meta function, e.g:

    <?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 = __( 'This entry was posted in %1$s and tagged %2$s on %3$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
    	);
    }
    ?>

    Thread Starter joe smith

    (@joe-smith)

    I created a child theme but it says my theme is broken and the description says missing template?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What’s in your Child Theme style.css file?

    Thread Starter joe smith

    (@joe-smith)

    /*
     Theme Name:     Twenty Twelve Child
     Theme URI:      https://example.com/twenty-twelve-child/
     Description:    Twenty Twelve Child Theme
     Author:         John Doe
     Author URI:     https://example.com
     Template:       twentytwelve
     Version:        1.0.0
    */
    
    @import url("../twentytwelve/style.css");
    
    /* =Theme customization starts here
    -------------------------------------------------------------- */
    Thread Starter joe smith

    (@joe-smith)

    Its a plain text file

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    It needs to be a “css” file that has a “.css” extension.

    Thread Starter joe smith

    (@joe-smith)

    when i created the style.css folder it wouldn’t let me edit the folder because there is nothing in the folder so i had to create a word file and save it as a plain text file.i don’t know how else to save a file as a css file because my laptop doesn’t have that option to convert it to a css file.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you rename it and manually replace the “.txt” extension with “.css”?

    Thread Starter joe smith

    (@joe-smith)

    <img src=”https://i417.photobucket.com/albums/pp259/crucialconfiict2/yeaaaa.png&#8221; border=”0″ alt=” photo yeaaaa.png”/>

    i can save it with a .css at the end but the file itself will either be a word document, plain text, rich text or whatever file option windows gives me and then i have to upload it to my directory under the style.css folder.

    Thread Starter joe smith

    (@joe-smith)


    here

    sorry posted that link wrong

Viewing 15 replies - 1 through 15 (of 52 total)
  • The topic ‘How do i un-link the date and author name in the post meta?’ is closed to new replies.