WordPress.org

Ready to get started?Download WordPress

Forums

Themolio
Remove Date/ Time/ Reply on post (3 posts)

  1. bbesabe
    Member
    Posted 1 year ago #

    I am trying to only show the image and author.

    How do I hide the time, date, reply?

    http://genderspender.com/

  2. mmatson
    Member
    Posted 1 year ago #

    I just did this yesterday!

    appearance>editor>Theme Functions (functions.php)

    Command F to find: "Author"

    Scroll down til you see the following code:

    '/**
     * Prints HTML with meta information for the current post-date/time and author.
     * Create your own themolio_posted_on to override in a child theme
     */
    if (!function_exists('themolio_posted_on')):
    function themolio_posted_on() {
    	printf(__('<span class="entry-date">Posted on <a href="%1$s" title="%2$s" rel="bookmark">%3$s</a> </span><span class="entry-author">By <a href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'themolio' ),
    		esc_url(get_permalink()),
    		esc_attr(get_the_time()),
    		esc_html(get_the_date()),
    		esc_url(get_author_posts_url(get_the_author_meta('ID'))),
    		esc_attr(sprintf(__('View all posts by %s', 'themolio'), get_the_author())),
    		get_the_author()
    	);
    	?>
    	<?php edit_post_link(__('Edit','themolio'), '<span class="edit-link">', '</span>'); ?>
    	<?php
    }
    endif;'
    
    Change to: 
    
    '/**
     * Prints HTML with meta information for the current post-date/time and author.
     * Create your own themolio_posted_on to override in a child theme
     */
    if (!function_exists('themolio_posted_on')):
    function themolio_posted_on() {/*
    	printf(__('<span class="entry-date">Posted on <a href="%1$s" title="%2$s" rel="bookmark">%3$s</a> </span><span class="entry-author">By <a href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'themolio' ),
    		esc_url(get_permalink()),
    		esc_attr(get_the_time()),
    		esc_html(get_the_date()),
    		esc_url(get_author_posts_url(get_the_author_meta('ID'))),
    		esc_attr(sprintf(__('View all posts by %s', 'themolio'), get_the_author())),
    		get_the_author()
    	);
    	?>
    	<?php edit_post_link(__('Edit','themolio'), '<span class="edit-link">', '</span>'); ?>
    	<?php
    */}
    endif;
  3. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    @mmatson - it is not a good idea to modify theme files - as your changes will be lost when the theme is updated. For this kind of modification you should use a Child Theme - http://codex.wordpress.org/Child_Themes

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic