• Bit of a newbee here.

    I’ve searched WP settings to change and theme php files for code snippets others cited in the forums regarding author, date, comment removal/hiding in themes.

    I have Elbee Elgee theme. I was only able to disable comments by changing the page.php file.

    I can’t remove author and date.

    I looked in loop files, index, etc. I don’t recognize anything familiar.

    I want to only remove author & date in pages.

    Can someone pls help?

Viewing 15 replies - 16 through 30 (of 35 total)
  • tokshra

    (@tokshra)

    <?php

    remove_action( ‘lblg_after_itemtext’, ‘lblg_post_info’ );
    function npat_unplug_lblg_post_info(){
    remove_action( 'lblg_after_itemtext', 'lblg_post_info' );
    add_action( 'lblg_after_itemtext', 'lbc_post_info' );
    }
    add_action( 'init', 'npat_unplug_lblg_post_info');

    function lbc_post_info(){
    if( !is_page() ) { ?>
    <span class="postcats">Posted in <?php the_category(', '); ?></span>
    <?php } ?>
    <?php if( is_single() ){?>
    <span class="posttags"><?php the_tags('Tagged as: ',','); ?></span>
    <?php }
    }

    Delete that first remove_action line, the one outside the function.

    tokshra

    (@tokshra)

    now I get this error:
    Parse error: syntax error, unexpected ‘}’ in /home/umarketi/public_html/sarcoidosisonline.com/wp-content/themes/elbee-child/functions.php on line 9

    tokshra

    (@tokshra)

    Now I am getting
    Parse error: syntax error, unexpected ‘}’ in /home/umarketi/public_html/sarcoidosisonline.com/wp-content/themes/elbee-child/functions.php on line 10

    with this function:
    function lbc_unplug_lblg_post_info(){
    remove_action( ‘lblg_after_itemtext’, ‘lblg_post_info’ );
    add_action( ‘lblg_after_itemtext’, ‘lbc_post_info’ );
    }
    add_action( ‘init’, ‘lbc_unplug_lblg_post_info’);

    function lbc_post_info(){
    if( !is_page() ) { ?>
    <span class=”postcats”>Posted in <?php the_category(‘, ‘); ?></span>
    <?php } ?>
    <?php if( is_single() ){?>
    <span class=”posttags”><?php the_tags(‘Tagged as: ‘,’,’); ?></span>
    <?php }
    }

    tokshra

    (@tokshra)

    Never mind…I had left off the <?php
    it is OK now!

    WHEW!!!

    Good to know. Thanks for updating me.

    Pistolpier

    (@pistolpier)

    Hi ZaMoose, I have just tried to do what you mentioned above and I now have the following error.
    “Parse error: syntax error, unexpected $end in /home/macli925/public_html/wp-content/themes/elbee-child/functions.php on line 2.

    Any cannot get back to my site to change the info or delete what I did, whihc was entered the following info in the child theme.

    “remove_action( ‘lblg_after_itemtext’, ‘lblg_post_info’ ); “

    help!!!

    Pistolpier

    (@pistolpier)

    Dont worry I ended up deleting the Child theme and are going to leave it with the info at the bottom of the page

    I uploaded the child theme you said on my godaddy host and cut and paste the lines from above and still was notable to get rid of the posted by and date on each page… I was able to do it before without uploading the chil theme you suggest and then the template was updated. Any suggestions on how I can really remove this stuff or locate thechild theme without uploading the one you gave us?

    gravy:
    I’m not sure what you’re asking. Could you try restating your question?

    Thanks.

    I uploaded and activated the elbee child theme, activated it, went to the function.php tab and all there was is: <?php

    I then added: remove_action( ‘lblg_after_itemtext’, ‘lblg_post_info’ ); before and after it and it did not work… I also added: remove_action( ‘lblg_after_itemtext’, ‘lblg_post_info’ );
    function npat_unplug_lblg_post_info(){
    remove_action( ‘lblg_after_itemtext’, ‘lblg_post_info’ );
    add_action( ‘lblg_after_itemtext’, ‘lbc_post_info’ );
    }
    add_action( ‘init’, ‘npat_unplug_lblg_post_info’);

    function lbc_post_info(){
    if( !is_page() ) { ?>
    <span class=”postcats”>Posted in <?php the_category(‘, ‘); ?></span>
    <?php } ?>
    <?php if( is_single() ){?>
    <span class=”posttags”><?php the_tags(‘Tagged as: ‘,’,’); ?></span>
    <?php }
    }
    Before and after, and saved it and it still did not work… on the older version of elbee elgee you didn’t have to do all of this… any suggestions on what’s missing? everytime I follow your directions, it doesnt work on my site…

    Gravy:
    Do you have a link to your site that I could take a look at by any chance?

    https://doasianfood.com

    I’ve got this error message and site does not functioning no more.
    Can you help me please..?

    Parse error: syntax error, unexpected $end in /home/kdub12/public_html/doasianfood.com/wp-content/themes/elbee-child/functions.php on line 14

    I added this after the first line <?php

    function npat_unplug_lblg_post_info(){
    remove_action( ‘lblg_after_itemtext’, ‘lblg_post_info’ );
    add_action( ‘lblg_after_itemtext’, ‘lbc_post_info’ );
    }
    add_action( ‘init’, ‘npat_unplug_lblg_post_info’);

    function lbc_post_info(){
    if( !is_page() ) { ?>
    <span class=”postcats”>Posted in <?php the_category(‘, ‘); ?></span>
    <?php } ?>
    <?php if( is_single() ){?>
    <span class=”posttags”><?php the_tags(‘Tagged as: ‘,’,’); ?></span>

    julie:
    Looks like you forgot a closing curly bracket. Add
    <?php } ?> after the closing span tag and see if that helps.

    julie:
    Looks like you forgot a closing curly bracket. Add
    <?php } ?> after the closing span tag and see if that helps.

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘Remove Author and Date in Pages only in Elbee Elgee theme’ is closed to new replies.