News Child – Remove Date in posts

Community Forums Forums Design Tips and Tricks News Child – Remove Date in posts

This topic is: resolved

This topic contains 9 replies, has 3 voices, and was last updated by  anitac 1 year, 1 month ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #42807

    LdyLarke
    Participant
    Post count: 46

    How can I remove the date in posts on the News child theme? Just need to know where to make the edits?

    I’d like to implement what was done in this article. Only show the date for posts 90 days old or less.


    #47339

    RobG
    Participant
    Post count: 1036

    Hello in your function.php file you should see someting like this

    /** Relocate the post info function */
    remove_action( ‘genesis_before_post_content’, ‘genesis_post_info’ );
    add_action( ‘genesis_before_post’, ‘genesis_post_info’ );

    /** Customize the post info function */
    add_filter( ‘genesis_post_info’, ‘post_info_filter’ );
    function post_info_filter($post_info) {
    if ( !is_page() ) {
    $post_info = ‘ [post_author_posts_link] [post_time] [post_comments] [post_edit]‘;
    return $post_info;
    }}

    You can just remove any element you don’t want like [post_author_posts_link] [post_time] [post_comments] [post_edit]

    You can also add them back to that file the same way you removed them. Hope this helps.


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    • This reply was modified 1 year, 1 month ago by  RobG.
    • This reply was modified 1 year, 1 month ago by  RobG.
    • This reply was modified 1 year, 1 month ago by  RobG.
    • This reply was modified 1 year, 1 month ago by  RobG.
    #47464

    LdyLarke
    Participant
    Post count: 46

    Thanks Rob, but I can’t find any of that in the News functions.php file.

    Any other ideas? C’mon people, this is a month old post now.


    #47534

    RobG
    Participant
    Post count: 1036

    Hello Shannon it should be in your functions.php not News functions.php.


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    #47586

    LdyLarke
    Participant
    Post count: 46

    Are you saying I need to edit the core Genesis function.php file? Studiopress always says not to edit the core files, that’s why I’m asking.

    edit: never mind, I think I’ve got it sorted. :)

    edit2: nope, this file has none of the code you quoted either.

    path: /wp-includes/functions.php

    nor /wp-content/themes/news

    Now what?


    • This reply was modified 1 year, 1 month ago by  LdyLarke.
    • This reply was modified 1 year, 1 month ago by  LdyLarke.
    • This reply was modified 1 year, 1 month ago by  LdyLarke.
    • This reply was modified 1 year, 1 month ago by  LdyLarke.
    #47636

    RobG
    Participant
    Post count: 1036

    Hello Shannon you can edit that file right in your WordPress dashboard, Goto Appearance >Editor and on your right hand side you’ll see all your files.. Just choose the functions.php and make the necessary changes.


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    #47644

    LdyLarke
    Participant
    Post count: 46

    Still no luck lol

    Attempting to make changes via simple hooks instead


    #47905

    anitac
    Participant
    Post count: 7031

    @LdyLarke, you can use the Simple Edits plugin – http://wordpress.org/extend/plugins/genesis-simple-edits/ to accomplish this. You are correct, the News theme doesn’t have the code Rob referred to so you need to actually add it to the bottom of your functions.php file.

    [php]//* Customize the post info function
    add_filter( ‘genesis_post_info’, ‘post_info_filter’ );
    function post_info_filter($post_info) {
    if ( !is_page() ) {
    $post_info = ‘[post_date] by [post_author_posts_link] [post_comments] [post_edit]‘;
    return $post_info;
    }}[/php]

    Add the above but customize by removing the date, etc.


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    • This reply was modified 1 year, 1 month ago by  anitac. Reason: correct MAJOR typo!
    • This reply was modified 1 year, 1 month ago by  anitac. Reason: correct MAJOR typo!
    #47952

    LdyLarke
    Participant
    Post count: 46

    Thanks! thought I was losing my mind, not being able to find the code.


    #47996

    anitac
    Participant
    Post count: 7031

    You’re welcome and I have Fibromyalgia too! Email me sometime if you want.


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘News Child – Remove Date in posts’ is closed to new replies.