Thread Starter
hAtul
(@free269)
^ exactly edited my post about it, noticed I didn’t write what theme.
you want to remove the ‘continue reding’ text but keep the functionality?
if so, one possibility could be to edit content.php in a child theme (http://codex.wordpress.org/Child_Themes ) and change this line (line 54):
the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) );
to:
if( is_home() ) { the_content( ' ' );
} else { the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) ); }
Thread Starter
hAtul
(@free269)
Thank you alchymyth for your response.
But it didn’t really help.
I’ll explain:
In my homepages blog I only view the headline of the post and the image.
The first thing that I did was to start every post in my blog with the “more” tag and delete the “Continue reading <span class=”meta-nav”>→</span>” from:
the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) );
So it wont show up. The problem is – that the div of the content still shows up, but shows up empty – takes place in my design, and if I edit it and give it a defined height using CSS – it affects the div when viewing the full post page.
When I try hiding it using CSS (using visibilaty or display), it hides the content, but it hides the content inside the full post page.
Thread Starter
hAtul
(@free269)
I have an idea. but im new with php. so maybe you can help me.
I want to check if it’s the home page.
If it is the homepage so don’t run the <div class=”entry-content”> at all.
(or if it’s not the homepage so run <div class=”entry-content”>. but this will be the only condition).
How do I do it?
edit:
did the code myself I think it works 🙂
<?php if ( is_search() ) : ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php elseif ( is_home()==false ) : ?>
<div class="entry-content">
<?php
the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) );
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
?>
</div>
<!-- .entry-content
<?php endif; ?>
you could use CSS to selectively remove the ‘continue reading’ just from the home page, based on the CSS class output by body_class()
http://codex.wordpress.org/Function_Reference/body_class :
.home .more-link { display: none; }