• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Removing date and author from posts in Crystal

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Removing date and author from posts in Crystal

This topic is: not resolved

Tagged: Author, Cyrstal theme, remove date

  • This topic has 9 replies, 3 voices, and was last updated 9 years, 1 month ago by Brad Dalton.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • February 2, 2014 at 11:05 pm #88283
    kathiemt
    Participant

    I'm using the Crystal theme and looking for a way to remove the author and date reference on posts. But it's not working.

    Tried this code at the end of the css which I found in another thread.

    .single-post .post-info .date,
    .single-post .post-info .time {
    display: none;
    }

    But that hasn't done what I need. Any ideas please?


    Virtual Assistant & Nature Photographer
    Kathie Thomas: VADirectory – Click here for Australian images

    http://www.publicspeaking.com.au/blog/?p=978
    February 3, 2014 at 12:25 am #88292
    nutsandbolts
    Member

    Add this to functions.php:

    //* Remove post info on single posts
    add_action ( 'genesis_post_content' , 'remove_post_info_single' );
    function remove_post_info_single() {
    	global $post;
    	if ( is_single () )
    		remove_action( 'genesis_before_post_content', 'genesis_post_info' );
    }

    That should remove the post info on single posts only.


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    February 3, 2014 at 1:18 am #88296
    kathiemt
    Participant

    Thanks, but that didn't work. I ended up with this error message:

    Parse error: syntax error, unexpected T_GLOBAL, expecting T_STRING or T_VARIABLE or '$' in /clientdata/www/au/p/publicspeaking.com.au/blog/wp-content/themes/crystal/functions.php on line 140


    Virtual Assistant & Nature Photographer
    Kathie Thomas: VADirectory – Click here for Australian images

    February 3, 2014 at 1:22 am #88297
    nutsandbolts
    Member

    Try taking out the line that says global $post; - that should get it. If not, please paste in the entire functions.php and I'll take a look.


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    February 4, 2014 at 10:03 pm #88698
    kathiemt
    Participant

    That didn't work at all. I've now changed the theme for the client who wanted one that was mobile responsive and tried this code for that theme too (Executive Pro) but it definitely didn't work and came up with error codes as mentioned above.


    Virtual Assistant & Nature Photographer
    Kathie Thomas: VADirectory – Click here for Australian images

    February 4, 2014 at 10:04 pm #88699
    kathiemt
    Participant
    This reply has been marked as private.
    February 4, 2014 at 10:25 pm #88703
    nutsandbolts
    Member

    This works for Executive Pro - I just used it on a test site:

    //* Remove post info on single posts
    add_action( 'genesis_before_loop', 'nabm_remove_post_info' );
    function nabm_remove_post_info() {
    if( is_single() )
    remove_action( 'genesis_entry_header', 'genesis_post_info', 5 );
    }

    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    February 4, 2014 at 11:15 pm #88705
    kathiemt
    Participant

    I'm still getting an error.

    Parse error: syntax error, unexpected $end, expecting T_STRING or T_VARIABLE or '$' in /clientdata/www/au/p/publicspeaking.com.au/blog/wp-content/themes/executive-pro/functions.php on line 224


    Virtual Assistant & Nature Photographer
    Kathie Thomas: VADirectory – Click here for Australian images

    February 4, 2014 at 11:17 pm #88706
    nutsandbolts
    Member

    I can't tell where line 224 is - when I paste your functions file above into a text editor, it's only 221 lines long. But since it doesn't have code tags the formatting is incorrect.

    Can you download your functions.php and attach it to an email? My email address is [email protected]


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    February 5, 2014 at 1:38 am #88719
    Brad Dalton
    Participant

    Try the 2nd snippet on this page and remove the shortcode for the date and author from the code.

    What you need to do is filter the post info and return the modified value.

    Otherwise you can use the remove action to remove the entire post info however your question related to removing the date and author only.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble