Support » Themes and Templates » Custom meta data

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    The solution that I implemented is using a tag to remove the information

    May you post the code (if it’s not too lengthy) that you have tried?

    I implemented the same thing in the functions. However this does not edit the meta data for the content-single.php

    if ( ! function_exists( ‘twentyeleven_posted_on’ ) ) :
    /**
    * Prints HTML with meta information for the current post-date/time and author.
    * Create your own twentyeleven_posted_on to override in a child theme
    *
    * @since Twenty Eleven 1.0
    */
    function twentyeleven_posted_on() {
    if(has_tag(‘no_date’)){
    printf( __( ‘<span class=”meta-sep”>Posted by</span> %1$s’, ‘twentyten’ ),
    sprintf( ‘<span class=”author vcard”>%3$s</span>’,
    get_author_posts_url( get_the_author_meta( ‘ID’ ) ),
    sprintf( esc_attr__( ‘View all posts by %s’, ‘twentyten’ ), get_the_author() ),
    get_the_author()
    )
    );
    }
    elseif(has_tag(‘no_author’)){
    printf( __( ‘<span class=”sep”>Posted on </span><time class=”entry-date” datetime=”%3$s” pubdate>%4$s</time>‘, ‘twentyeleven’ ),
    esc_url( get_permalink() ),
    esc_attr( get_the_time() ),
    esc_attr( get_the_date( ‘c’ ) ),
    esc_html( get_the_date() )
    );
    }
    elseif(has_tag(‘no_author_date’)){
    printf( __( ”, ‘twentyeleven’ ),
    esc_url( get_permalink() ),
    esc_attr( get_the_time() ),
    esc_attr( get_the_date( ‘c’ ) ),
    esc_html( get_the_date() )
    );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom meta data’ is closed to new replies.