Support » Themes and Templates » TwentyEleven Continue Reading

Viewing 13 replies - 1 through 13 (of 13 total)
  • i wish i could help you but how did you get the margin so small between header and content?

    look here:

    anyone have a idea?

    You might try the codex about the ‘read more’ link.

    I’ve been trying to customize my own ‘continue reading’ link in my child theme’s content.php using the “get_the_title” function in the codex with no success.

    The key bit seems to be here:
    <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
    It comes a few lines after the </header><!-- .entry-header --> bit.

    I’ve inserted the get_the_title function to return a result like “continue reading [post title]” (with the template’s little nav arrow) intact but whatever changes I make in my content.php aren’t reflected in the front end. When I botch the code I do get an error, though; I just can’t seem to affect the ‘continue reading’ text.

    I’ve even tried mucking with it in the parent theme’s content.php. Is it called from some other doc? Any help will be appreciated…especially a code snipped that would show how to insert the get_the_title function, which I would EXPECT to read like this:

    <?php the_content( __( 'Continue reading <?php get_the_title($post); ?> <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>




    Forum Moderator

    you are working with a string and already within a php tag – so, no extra php tags;


    <?php the_content( __( 'Continue reading [' . get_the_title($post->ID) . '] <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>

    there is a similar example in here:



    Forum Moderator


    where do you want to ‘remove the continue reading function’?

    on posts with a ‘more tag’ on the front page?

    or on the excerpts in search results?

    Tnanks @alchymyth. I saw that tip when reading about the <more> tag, and tried to implement it myself…but wasn’t clear enough how to insert the example code in the actual statement in content.php. Not knowing php I tripped myself up.

    So I inserted this code but still see the default ‘Continue reading’ behavior. No post titles. Can I append the code? I checked that the content.php is in the child theme.

    Thanks in advance if you have the opportunity.

    On an unrelated quick question, in Twenty Eleven, I’ve applied a background color to post titles (<class “entry-title”> which looks great, but wanted to have a rollover highlight (brighter color). Naturally I though I could style .entry-title a:hover with a background color but of course it ends with the link text – not the whole bar as I’d hoped. I want the whole <entry-title> element to have hover behavior. No go, eh?

    OK – enough!

    </header><!-- .entry-header -->
    <?php global $more; if( $wp_query->current_post <= 2 && !is_paged() ) { $more = -1; } else { $more = 1; }  ?>
    		<?php if ( is_search() || $wp_query->current_post > 2 || is_paged() ) : // Only display Excerpts for Search ?>
    		<div class="entry-summary">
    		<?php the_excerpt(); ?>
    		</div><!-- .entry-summary -->
    		<?php else : ?>
    		<div class="entry-content">
    <?php the_content( __( 'Continue reading [' . get_the_title($post->ID) . '] <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
    		<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',  'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->
    		<?php endif; ?>

    When the search results come up on my site, at the end of the excerpts there is the text: “continue reading” which I want to change to something else.
    I’m using twentyeleven theme with a child theme. Is it possible to change this text simply by putting something in the style.css in my child theme folder? (rather than putting a php file in the child theme folder and tweaking as above). Thanks! (and apologies if this is a stupid question!)



    Forum Moderator

    Please post a new topic.

    Sorry! I thought it was the same topic as the first poster! (I’m a complete beginner)

    @clovis, the functionality comes from the php, which composes the page. The CSS styles it – which means you can change the color, font, etc., incl. making it disappear (‘display:none’) but you can’t change the text.
    I never did figure out why I couldn’t make it work as I wanted it to.

    BTW, when you put a php in your child theme (very handy) you only add to it the function you want – not replicate the whole parent functions.php in the child theme folder. Future reference.

    @mrmark Aha, thanks! 🙂



    Hi everybody,
    I also have a problem with this function,

    I am using a plugin called “polylang” for bilingual (English & Persian) purpose, in English I don’t have any problem, but in Persian this link (Continue reading) is still in English and I want to add translation of this link in Persian as well.

    Please help me.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘TwentyEleven Continue Reading’ is closed to new replies.