Support » Themes and Templates » Remove Author and Date in Pages only in Elbee Elgee theme

  • CEgos

    (@cegos)


    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 - 1 through 15 (of 35 total)
  • CEgos

    (@cegos)

    bump
    sorry, really need help

    CEgos:
    You want to disable those for all posts, pages, etc., or only JUST pages?

    I just posted this in one of the other threads, but the answer is in my FAQ for Elbee Elgee.

    Q: “How can I remove the ‘Posted by admin on (date) edit this entry’ ? I don’t want that to show on my page.”

    A:

    Make sure you’re using a child theme (see above).
    Edit your child theme’s functions.php
    Add this to the bottom of functions.php:

    remove_action( ‘lblg_after_itemtext’, ‘lblg_post_info’ );

    Hope this helps!

    I am having the same problem… what is a child theme in Elbee Elgee? I am also having some issues finding the “functions.php” I tried to add the line at the end of your post to the “edit” section on the pages, but it didn’t do anything… any advice?

    gravy:

    1. Grab this child theme: https://bitbucket.org/zamoose/elbee-elgee/downloads/elbee-child-1.1.zip
    2. Unzip it in your wp-content/themes/ directory.
    3. Activate the child theme.
    4. Add the lines I specified above to wp-content/themes/elbee-child/functions.php
    5. Profit!

    I have done all this…downloaded the child theme
    installed and activated
    added the line to the functions.php

    The author date and name are still there!

    How do you REALLY get rid of this? Give me the code to change in the editor…I am very familiar with the editor.

    Also, after adding the code, the line of code appears at the top of the page! You can see it here: http://www.sarcoidosisonline.com

    tokshra:
    That looks like you may have pasted the code outside of the PHP tags. If all you added was that line, your functions.php should look like the contents of this Gist:

    https://gist.github.com/1964125

    Try grabbing that code and replacing the contents of wp-content/themes/elbee-child/functions.php with it.

    there was only one line in functions:
    <?php

    now there are 2:

    <?php
    remove_action( ‘lblg_after_itemtext’, ‘lblg_post_info’ );

    so, where does the line go then?

    I copied and pasted just as shown…still no difference?

    tokshra:
    I’m not sure I follow your question. The entire contents of functions.php should be the two lines I specified. That is to say, you should have those two lines and nothing else…

    tokshra:
    Did you add the remove_action() line to wp-content/themes/elbee-child/functions.php or did you add it to wp-content/themes/elbee-elgee/functions.php or did you add it to both?

    It should NOT be added to the parent Elbee Elgee install’s functions.php.

    yes, I had put it in the main theme…I have now deleted that.

    I have the 2 lines in child function.php just as you showed…the author and date are still showing?

    I really like this theme, but I would like to have the dates removed..it appears the author has disappeared, so it partly worked

    thanks for your input

    [/Facepalm]

    Of course it’s not going to work — you’ve got to hook it on init! I am so sorry — I gave you incomplete information.

    Try the following:

    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 }
    }

    Let me know if that works for you.

    That completely broke my site…this is what shows up now:
    Parse error: syntax error, unexpected ‘}’, expecting T_STRING or T_VARIABLE or ‘$’ in /home/umarketi/public_html/sarcoidosisonline.com/wp-content/themes/elbee-child/functions.php on line 7

    How do I get it back?

    Can you post the entirety of your functions.php so I can take a look?

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