• Resolved alexjourdan

    (@alexjourdan)


    Hello, I have searched on how to remove the line “Posted on May 23, 2019 by jourdan – Leave a comment” from the blog page of the StoreFront theme, I read that adding some lines to the css can be done but I already tried everything I have read on the Internet and I can not make it disappear, here is a link to a image of what I’m trying to remove.
    https://krome.mx/wp-content/uploads/2019/06/remove.jpg
    Thank you in advance

    • This topic was modified 5 years, 5 months ago by alexjourdan.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @alexjourdan,

    While you could hide this with CSS, I would recommend a more “correct” method. Now I say correct, but there’s truly not a wrong or right. I only mention this as with CSS you are just hiding that information. It is still loaded via PHP but no one sees it.

    I prefer to actually remove the code from ever loading, and lucky enough this part of Storefront is loaded in via an action which means we can remove that action. ??

    Following this method, I would use a plugin like Code Snippets to add this to your site, or use your child themes functions.php file.

    
    function remove_storefront_post_meta() {
    	remove_action('storefront_post_header_before', 'storefront_post_meta', 10);
    	
    };
    
    add_action( 'init', 'remove_storefront_post_meta');
    

    If you prefer CSS, try the following added to the Additional CSS section of the Customizer or in your preferred location.

    
    span.posted-on,
    span.post-author,
    span.post-comments {
        display: none;
    }
    
    Thread Starter alexjourdan

    (@alexjourdan)

    Ryan, the CSS solution worked just fine, your help is much appreciated.
    I will try the function remove later.
    Regards

    Hi @alexjourdan,

    Happy to help, I’m glad that worked for you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove Posted on date by author — Leave a Comment from Storefront’ is closed to new replies.