WordPress.org

Ready to get started?Download WordPress

Forums

Problem with "Read More" tag (2 posts)

  1. Dunger
    Member
    Posted 1 year ago #

    I've got a problem with "Read More" tag - it does show in the post on the homepage, it does link to the full article, but it doesn't split the text in the place i want.
    It seems like it splits the text after fixed number of signs in the post.

    I've tried to insert

    <?php
    global $more;
    $more = 0;
    ?>

    just after the the_post(), just before filter with the_content, inside entry div, but none of this worked.
    I'm not good at coding, so i really dont have a clue what can i do to fix it.

    My index.php looks like:

    <?php get_header(); ?>
    	<div id="main-area">
    		<?php
    			if (is_home()) {
    				$args=array(
    				   'showposts'=> (int) get_option('memoir_homepage_posts'),
    				   'paged'=>$paged,
    				   'category__not_in' => (array) get_option('memoir_exlcats_recent'),
    				);
    				query_posts($args);
    			}
    		?>
    
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    			<div class="entry clearfix">
    <?php
    				global $more;
    				$more = 0;
    				?>
    				<h2 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    				<?php $thumb = '';
    				$width = 135;
    				$height = 135;
    				$classtext = '';
    				$titletext = get_the_title();
    				$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,false,'Entry');
    				$thumb = $thumbnail["thumb"]; ?>
    
    				<?php if($thumb <> '' && get_option('memoir_thumbnails_index') == 'on') { ?>
    					<div class="post-thumbnail alignleft">
    						<a href="<?php the_permalink(); ?>">
    							<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?>
    							<span class="post-overlay"></span>
    						</a>
    					</div> 	<!-- end .post-thumbnail -->
    
    				<?php } ?>
    
    				<?php if ( get_option('memoir_blog_style') == 'on' ){ ?>
    
    					<?php echo apply_filters('the_content',et_create_dropcaps(get_the_content('Więcej'))); ?>
    				<?php } else { ?>
    					<p><?php echo et_create_dropcaps(truncate_post(775,false)); ?></p>
    				<?php } ?>
    
    				<div class="clear"></div>
    
    				<?php if ( get_option('memoir_readmore_button') == 'on' ) { ?>
    					<a href="<?php the_permalink(); ?>" class="readmore"><span><?php esc_html_e('Więcej', 'Memoir'); ?></span></a>
    
    					<div class="clear"></div>
    				<?php } ?>
    
    				<?php get_template_part('includes/postinfo'); ?>
    			</div> <!-- end .entry -->
    
    		<?php endwhile; ?>
    			<div class="page-navi clearfix">
    				<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
    				else { ?>
    					 <?php get_template_part('includes/navigation'); ?>
    				<?php } ?>
    			</div> <!-- end .entry -->
    		<?php else : ?>
    			<?php get_template_part('includes/no-results'); ?>
    		<?php endif; wp_reset_query(); ?>
    	</div> <!-- end #main-area -->
    	<?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I've got WordPress 3.3.2 and Memoir theme (i dont know which version, i'm not the one who has installed it).

    What can i do to fix it?

  2. Give this a read.

    http://codex.wordpress.org/Customizing_the_Read_More

    If you mean this theme http://www.elegantthemes.com/gallery/memoir/ then please contact the vendor for support.

    https://www.elegantthemes.com/members-area/

    When you purchased that theme, you also purchased support as well. It's not for us here to undercut their business model. You have the option to contact them and you should avail yourself of that.

    Also? You really want to upgrade (backup everything first, no really do that) to 3.4.1.

Topic Closed

This topic has been closed to new replies.

About this Topic