• Resolved gonzimalaga

    (@gonzimalaga)


    Hi, I don’t know why but the posts in the home page, i put the ‘read more’ part and it doesn’t appear. It cuts the post in the home page as if it’s finished but if you click the post you can see everything. Why can that be or in which php file could be the problem.

    I also have the problem that if i put an image to the post, it doesn’t appear in the home page, only if i click the post as before.

    Thanks!

Viewing 15 replies - 1 through 15 (of 15 total)
  • Theme Author Sami Keijonen

    (@samikeijonen)

    Yeah, that’s how WordPress the_excerpt works which I’m using in the theme.

    Thread Starter gonzimalaga

    (@gonzimalaga)

    But how can I repare it? In the demo it appears!

    Theme Author Sami Keijonen

    (@samikeijonen)

    What’s the link to your site?

    Thread Starter gonzimalaga

    (@gonzimalaga)

    Is in spanish but it only has three posts.
    The firts one appears empty and it is supossed that there is a photo and then Read More dont appear anythinh (if you click the post you will see the photos. The second and third posts both have Read More but doesnt appear(if you click you will see the full post).

    https://www.santamariadelavictoria.es

    Thread Starter gonzimalaga

    (@gonzimalaga)

    In function.php I didn’t change this code.

    /**
     * Change [...] to ... Read more.
     *
     * @since 1.0.0
     */
    function kuorinka_excerpt_more() {
    
    	/* Translators: The %s is the post title shown to screen readers. */
    	$text = sprintf( __( 'Read more %s', 'kuorinka' ), '<span class="screen-reader-text">' . get_the_title() . '</span>' );
    	$more = sprintf( '&hellip; <span class="kuorinka-read-more"><a href="%s" class="more-link">%s</a></span>', esc_url( get_permalink() ), $text );
    
    	return $more;
    
    }
    add_filter( 'excerpt_more', 'kuorinka_excerpt_more' );
    Theme Author Sami Keijonen

    (@samikeijonen)

    You have written custom excerpt so in that case read more link doesn’t appear. But you can add for example images in excerpt also.

    Thread Starter gonzimalaga

    (@gonzimalaga)

    Sorry I don’t understand. I have written custom excerpt where? This is the original code and I didn’t touch it.

    Theme Author Sami Keijonen

    (@samikeijonen)

    Or other option is that there is that this is the only content you have written: “En esta nocicia, podréis descargar la información sobre los Cultos 2016.”.

    If the article is that short there is no read more link. I know, I know, this is confusing as hell but this is how excerpt works in WP:)

    Thread Starter gonzimalaga

    (@gonzimalaga)

    but thats only the first one. the othres two have more comment… I’ve try to fing something in google and I’ve seen that some themes have in index.php this:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    	<h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    	<?php the_content(__('Read more'));?><div style="clear:both;"></div>

    mine it doesn’t appear:

    get_header(); ?>
    
    	<div id="primary" class="content-area">
    		<main id="main" class="site-main" role="main" <?php hybrid_attr( 'content' ); ?>>
    
    		<?php if ( !is_front_page() && !is_singular() && !is_404() ) : // If viewing a multi-post page ?>
    
    			<?php locate_template( array( 'loop-meta.php' ), true ); // Loads the loop-meta.php template. ?>
    
    		<?php endif; // End check for multi-post page. ?>
    
    		<?php if ( have_posts() ) : ?>
    
    			<?php do_action( 'kuorinka_before_loop' ); // Action hook before loop. ?>
    
    			<?php /* Start the Loop */ ?>
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php
    					/* Include the Post-Format-specific template for the content.
    					 * If you want to override this in a child theme, then include a file
    					 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    					 */
    					get_template_part( 'content', ( post_type_supports( get_post_type(), 'post-formats' ) ? get_post_format() : get_post_type() ) );
    				?>
    
    			<?php endwhile; ?>
    
    			<?php do_action( 'kuorinka_close_loop' ); // Action hook close loop. ?>
    
    			<?php
    				the_posts_pagination( array(
    					'prev_text'          => esc_html__( 'Previous page', 'kuorinka' ),
    					'next_text'          => esc_html__( 'Next page', 'kuorinka' ),
    					'before_page_number' => '<span class="meta-nav screen-reader-text">' . esc_html__( 'Page', 'kuorinka' ) . ' </span>',
    				) );
    			?>
    
    		<?php else : ?>
    
    			<?php get_template_part( 'content', 'none' ); ?>
    
    		<?php endif; ?>
    
    		<?php do_action( 'kuorinka_after_loop' ); // Action hook after loop. ?>
    
    		</main><!-- #main -->
    	</div><!-- #primary -->
    
    <?php get_footer(); ?>
    Thread Starter gonzimalaga

    (@gonzimalaga)

    now I have written a lot of information in a post and it appears… maybe It needs more than three phrases..

    Thread Starter gonzimalaga

    (@gonzimalaga)

    YES! Is that the problem… the lenght!.. Very thank you….

    And what about the images that for example are before the first words and they should appear in the post (in index) they only appear when I enter into the post. (I dont know if Ive explained well) [Im Spanish]

    Theme Author Sami Keijonen

    (@samikeijonen)

    You can set featured image which is shown on blog index also.

    Thread Starter gonzimalaga

    (@gonzimalaga)

    Sorry I dont understand:S

    Theme Author Sami Keijonen

    (@samikeijonen)

    It’s the image you can set when you edit the post. It’s on the right bottom.

    Thread Starter gonzimalaga

    (@gonzimalaga)

    Okk Thank you!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘'Read more->' doesn't appear’ is closed to new replies.