• Resolved roselaw86

    (@roselaw86)


    I would like to remove the date, author, posted in and last modified from my posts. I am using the preference light theme. I couldn’t find information on how to remove the information as well as the title (like the date and the word date preceding the published date). At the very least, the last three are the ones I really need hidden/deleted. I at least have the date set up to reflect when the posts were originally published. The date is redundant, but the lesser of the issues. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • For help with CSS, a live site link is required…if we cannot see the site, we cannot see the stylesheet(s), so we cannot suggest changes.

    To discover what CSS is output by your theme, use a web inspection tool such as Firebug: http://getfirebug.com/ , Chrome Inspect Element: https://developers.google.com/chrome-developer-tools/ or Internet Explorer 9+ F12 Dev. Tools: http://msdn.microsoft.com/en-us/library/dd565627(v=vs.85).aspx#csstool

    There are others.

    When editing CSS, use a Child Theme
    http://codex.wordpress.org/Child_Themes
    Custom CSS Plugin, or Theme provided custom CSS option.
    Edits to parent themes are lost on theme update.

    Learn CSS: http://www.w3schools.com/css/

    For specific theme related matters research the support for your theme.

    Thread Starter roselaw86

    (@roselaw86)

    Whoops! Sorry, I thought I included a link. One of the pages is slroselaw.com/march-2013. I already have a child theme. And would removing those sections be CSS, or PHP?
    And it’s not related to the theme, it’s a part of the formatting/layout common among every theme I’ve seen. However, I’ve seen a lot of reference that the coding is slightly different in each theme, which is why I included the theme I used.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    And it’s not related to the theme, it’s a part of the formatting/layout common among every theme I’ve seen.

    Can you give examples of themes that use the same formatting?

    BTW you don’t have a Child Theme. See: http://codex.wordpress.org/Child_Themes .

    Particularly look at the style.css example code:

    /*
    Theme Name:     Twenty Twelve Child
    Theme URI:      http://example.com/
    Description:    Child theme for the Twenty Twelve theme
    Author:         Your name here
    Author URI:     http://example.com/about/
    Template:       twentytwelve
    Version:        0.1.0
    */
    
    @import url("../twentytwelve/style.css");

    Thread Starter roselaw86

    (@roselaw86)

    I do have a child theme. I spent over an hour one day setting it up.

    As to which themes contain the same information, take your pic. Mog includes publish date, Responsive has date and author, Spun, Stitch, any of them on the first page when you select themes.

    I figured out the first part by playing around with it and teaching myself PHP so far. I deleted this section of code from the content-single.php file:
    <div class="gj-article-details"><dl class="gj-article-info"><dd><?php _e( 'Date: ', 'preference' ); ?><?php the_time(__('F j, Y', 'preference') ); ?></dd><dd><?php _e( 'Author: ', 'preference' ); ?><?php the_author(); ?></dd><?php edit_post_link( __( 'Edit', 'preference' ), '<dd class="edit-link">', '</dd>' ); ?></dl></div>

    For modified:

    <?php  the_modified_date( 'F j, Y', __( '<span class="modified-date">Last Modified: </span> ', 'preference') ); ?>
    	</footer><!-- .entry-footer -->

    For posted in:
    <?php $categories_list = get_the_category_list( _x( ', ', 'used between list items, there is a space after the comma', 'preference' ) );$tags_list = get_the_tag_list( '', _x( ', ', 'used between list items, there is a space after the comma', 'preference' ) );if ( $categories_list )printf( '<span>' . __( '<span class="cat-links">Posted in: </span> %1$s.', 'preference' ) . '</span><br />', $categories_list );if ( $tags_list )printf( '<span>' . __( '<span class="tag-links">Tagged: </span> %1$s.', 'preference' ) . '</span><br />', $tags_list );?>

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Removing dates and author from posts’ is closed to new replies.