• Resolved ibodyguard

    (@isentinel)


    Dear community,

    I am looking for a way to remove some metadata displayed on articles.

    I already know how to disable all of them with :

    .entry-meta {
    
        display: none;
    }

    But I would like to keep the publication date displayed.

    Does anyone have an idea ?

    Best,

Viewing 6 replies - 1 through 6 (of 6 total)
  • Watch this video about Firebug, which is a great tool to help you learn how to take control of this stuff. This will allow you to fine tune what you want to keep and what you want to delete.

    Thread Starter ibodyguard

    (@isentinel)

    Hi,

    Thanks for the video.

    I installed firebug and saw that I have to delete everything in the “entry-meta” class except

    <time datetime="2013-08-20T14:54:17+00:00" class="entry-date">20 ao?t 2013</time>

    What shall I do to edit it for every pages to come ?

    Thank’s

    Ah, so what you’re saying is that you want to delete all the text (including deleting the post categories/tags and author) but just leave the date?

    If so, then I think the easiest way would be to edit class-content-post_metas.php and change this:

    // 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>.' , 'customizr' );
                } elseif ( $categories_list ) {
                $utility_text   = __( 'This entry was posted in %1$s on %3$s<span class="by-author"> by %4$s</span>.' , 'customizr' );
                } else {
                $utility_text   = __( 'This entry was posted on %3$s<span class="by-author"> by %4$s</span>.' , 'customizr' );
            }

    to this:

    // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
            if ( $tag_list ) {
                $utility_text   = __( '%3$s' , 'customizr' );
                } elseif ( $categories_list ) {
                $utility_text   = __( '%3$s' , 'customizr' );
                } else {
                $utility_text   = __( '%3$s' , 'customizr' );
            }

    Thread Starter ibodyguard

    (@isentinel)

    Wow it worked absolutely well !!

    I wish I could resolve as easily as you such problems ^^

    Thank’s a lot !

    I wish I could resolve as easily as you such problems ^^

    All I did was:

    1. Took a backup of my site and downloaded it onto my local disk
    2. Used a search utility (my favourite is EasyFind) to find the string “This entry was posted in
    3. Found it in 3 places in one file (apart from finding it in all the language files, of course, which I ignored)
    4. Figured out that %3$s is the parameter for the date and everything else is other meta
    5. Deleted everything else, making sure I respected the quote-pairs.
    6. Voilà! — checking first that voilà does indeed have a grave accent ??

    Posted to give others the confidence to try…

    Thread Starter ibodyguard

    (@isentinel)

    Ok thank’s for that tip and that smart method !

    I’ll try it for my other issues ^^

    Best,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove specific meta on articles’ is closed to new replies.