• minimatical

    (@minimatical)


    Hi, I hope someone can help me!

    I use the theme “Twenty Eleven 1.2” and in any articles appear date and nickname! Example:
    “Posted on 30 october 2011 by minimatical”

    Date its ok, but I wanna remove “by minimatical” part.

    I try to delete some code in php page… but nothing! forum posts don’t help me! =/
    oh can I remove it?

    Thank you!

Viewing 13 replies - 16 through 28 (of 28 total)
  • Thread Starter minimatical

    (@minimatical)

    Oh, that was ok in Home page. But when I open a single article, in his footer I can read:

    This entry was posted in xxxxx by yyyyy

    So I have find this in content-featured.php
    and content-single.php
    so I have deleted:
    by <a href="%6$s">%5$s</a>
    (and I also have translate in my language)

    so I have put this two files in “twentyeleven-child-theme” folder, and now its ok!

    After lots of messing around and trying different things, this is what finally helped me.

    Edit the style.css of your child theme by adding the following line at the bottom

    .entry-meta{display:none;}

    That was it.

    Hey guys, thanks for your input I’ve been looking for a solution to this for a while. However it seems to break the backend of my site.

    @ alchymyth – When I put the following code into my twenty eleven Child Theme’s functions.php file, it breaks my site.

    After adding the code, the site functions okay from the front end and it does remove the ‘Posted By AuthorName’, BUT when I try to access the back end login area I just see a white screen.

    I put the following code into my child theme’s functions.php file:

    <?php
    if ( ! function_exists( 'twentyeleven_posted_on' ) ) :
    function twentyeleven_posted_on() {
      printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a>', 'twentyeleven' ),
        esc_url( get_permalink() ),
        esc_attr( get_the_time() ),
        esc_attr( get_the_date( 'c' ) ),
        esc_html( get_the_date() )
      );
    }
    endif;
    ?>

    Am I doing something wrong here? I tried removing the ‘If’ statements but I get the same issue of not being able to access the login area.

    Hi.
    Perhaps the function is also targeting the admin section. Try to change the beginning of your if statement to this:

    if ( ! function_exists( 'twentyeleven_posted_on' ) && ! is_admin() ) :

    The code is fine and should work.

    Try this:
    Remove the last ?> and leave the php tag open!

    HTH

    David

    Thanks for the tips guys, I managed to get it working.

    @ Digital Raindrops – I tried removing the last ?> but it didn’t have any effect, so I tried something similar.

    My child functions.php file was like this:

    <php
       // I had custom code here already
    ?>
    <php
       // I had the code here mentioned in my first post
    ?>

    I simply got rid of the two seperate opening and closing php tags, and
    made it as one, e.g.

    <php
       // ccustom code here already
       // code here mentioned in my first post
    ?>

    Thanks for the tips guys, I managed to get it working.

    You are welcome, and I’m glad you were able to figure it out.
    Please don’t forget to mark this thread as resolved whenever you get a chance.
    Thanks!

    Hi Marventus, I’m new to the forum and am not sure how to mark this thread as resolved. I’m just trying to work out how to do that, if you can let me know that would be great.

    Update: I think the reason why I can’t mark it as resolved is because I didn’t start the thread, is that right?

    @cherry0: Yes, that is correct. I forgot it wasn’t you who started the thread: sorry about that! ??
    In case you want to know how to do it for other threads you open, the option appears as a dropdown box on the right side of the thread with the title “This topic is”.

    @minimatical: could you do the honors whenever you can?
    Thanks!

    hello, i have a question,
    I followed this threads advice to hide the posted on date on my posts as well, only now i am getting this:
    Parse error: syntax error, unexpected $end in /home/jadelor/domains/canelaevents.nl/public_html/wp-content/themes/twentyeleven/functions.php on line 583

    Can any one help me? I am very inexperienced at HTML so i dont really know what to look for.

    Any help is apreciated!!

    https://www.canelaevents.nl

    CHEERS!!
    JADE

    Hi jadermeister,

    You seem to be missing a curly bracket { or have one two many in your functions.php file. Also, check to see if your opening (<?php) and closing (?>) PHP tags are properly placed.
    If you still can’t figure it out, try creating a paste of your functions.php code in Pastebin so that we can take a look at it.

    Cheers!

    In the child theme’s style.css add this code:

    .post .entry-utility, .post .entry-meta {display:none;}

    this works in the twenty ten theme too. Probably works in most themes.

    I had a similar problem. I wanted to remove the “Posted on”.

    I copied the twentyeleven_posted_on() function to my child functions.php and removed the “posted on”-part. <- Here is where you remove what you want.
    Then renamed it to custom_posted_on().

    Finally edited the content.php and content-single.php to contain the custom_posted_on.
    <?php if ( ‘post’ == get_post_type() ) : ?>
    <div class=”entry-meta”>
    <?php custom_posted_on(); ?>
    </div><!– .entry-meta –>
    <?php endif; ?>

    It might help.

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘Twenty Eleven – Remove "Posted by …"’ is closed to new replies.