• 0
Sign in to follow this  
Followers 0

Content showing twice in blog posts in eco pro

Question

Posted · Report post

I was having a problem where the category page was only showing excerpts. So I changed some code in the loop. Now, the category page is fine, but every post is displaying the content twice. I assume it's something in the loop, which is here:

<?php if (!is_404() && have_posts()) : while (have_posts()) : the_post(); // START OF THE LOOP ?>
	
		
id="post-<?php the_ID(); ?>"> <?php if(is_single()): // Post to Post Navigation?>
<?php previous_post_link('%link') ?> <?php next_post_link('%link') ?>
<?php endif;?> <?php if(!is_page()):?>
<?php if(pl_show_thumb($post->ID)): // Thumbnails ?> <?php endif; ?>

<?php the_title(); ?>

<?php _e('On',TDOMAIN);?> <?php the_time(get_option('date_format')); ?>, <?php _e('in',TDOMAIN);?> <?php the_category(', ') ?>, <?php _e('by',TDOMAIN);?> <?php the_author(); ?> <?php edit_post_link(__('(Edit Post)', TDOMAIN), ' ', ' ');?>
<?php the_content('Read more...'); ?> <?php if(pl_show_excerpt($post->ID)): // Post Excerpt ?>
<?php the_excerpt(); ?>
<?php if(is_home() && !pl_show_content($post->ID)): // 'Continue Reading' link ?> <?php e_pagelines('post_footer_text', __('Continue Reading', TDOMAIN));?> <?php endif;?> <?php endif; ?>
<?php endif;?> <?php if(pl_show_content($post->ID)): // Post and Page Content ?>
<?php the_content(__(' Continue reading »',TDOMAIN)); ?> <?php if(is_single()) wp_link_pages(__(' Pages:', TDOMAIN), '', __('number', TDOMAIN)); ?> <?php edit_post_link(__('Edit',TDOMAIN), ' ', ''); ?>
<?php the_tags(__('Tagged with: ', TDOMAIN),' • ',' '); ?>
<?php if(pagelines('authorinfo') && is_single() && VPRO):?> <?php include(THEME_LIB.'/_authorinfo.php');?> <?php endif;?> <?php endif;?> <?php if(!is_page()) include(THEME_LIB.'/_post_footer.php');?>
<?php if(is_single() || is_page()): // Content sidebar and comments area ?> <?php if(VPRO) include(THEME_LIB."/_contentsidebar.php");?>
">
<?php comments_template();?>
<?php endif; endwhile; ?> <?php include(THEME_LIB.'/_pagination.php');?> <?php else : // show this if 404 error or no post/page is returned ?>
<?php if(is_404()):?>

<?php _e('Error 404 - Page Not Found',TDOMAIN);?>

<?php else:?>

<?php _e('Nothing Found',TDOMAIN);?>

<?php endif;?> <?php _e('Sorry, what you are looking for isn't here.', TDOMAIN);?>
<?php include (THEME_LIB . '/_searchform.php'); ?>
<?php endif; // end the loop ?> [/code]

Any help there?

Share this post


Link to post
Share on other sites

14 answers to this question

  • 0

Posted · Report post

What file did you edit?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

What code in the file did you adjust? Did you change something or delete something from it?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I added this: ?php the_content('Read more...'); ?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Nick, You shouldn't edit the core files for this very reason and also, if an update is released these changes will be overwritten. I have provided a screencast below, check to see if your settings are to this, you probably have one option set as the same as the other and this is causing the double content. http://screencast.com/t/hQ4b8kFY

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

That seems to make it so the /blog page shows the content once, but the single post page still shows the content twice: http://www.jennyandfrancois.com/2012/05/16/things-people-like-about-natural-wines-part-4-fifi-of-the-ten-bells/ As for modifying the core files, I was following instructions given to me on this forum: http://www.pagelines.com/forum/discussion/2860/show-full-post-on-category-page-in-eco-pro/p1

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I decided to remove the code I added to the_loop.php because the blog looked really dumb. Now I am back to the start. The problem is the category page you see here: http://www.jennyandfrancois.com/category/things-people-like-about-natural-wines/ I would like to display the full content of the posts there. How can that be done?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

The settings for full excerpts can be set very easily in PageLines Framework. Please consider upgrading. The setting for full content is set at Dashboard > EcoPro > Theme Options > Pages And Posts under "Full Post Content Placement" (scroll down) and check the option[b] Show full content on all blog pages[/b] That should do the trick.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

That box is already checked.This was already suggested above. I have checked that box and it does not affect the category page at all. I would be happy to upgrade if you give it to me for free.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Have you tried deactivating any active plugins to see if the category page displays your content correctly? PageLines Framework is only available for free if you purchased PlatformPro developer license after September 15th.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Just tried deactivating all plugins and the category page did not change. My comment about giving it to me for free was sarcastic. When I purchased eco pro originally it did come with lifetime support correct? This doesn't seem like a very complicated problem to correct. I imagine some type of code needs to be added to the loop. This should probably specify that if a certain category (or possibly all categories) are displayed, the full post content should be displayed. Can anyone tell me what that code should be?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Sometimes the customer is serious about those things. ;) If the setting isn't working, perhaps try re-installing the theme to see if the problem persists, but first make sure you have your database backed up and if you made any other customizations and what not, those should be backed up, too. I'm not sure what code would be needed to display full post content (especially since it's not recommended that files should be left alone).

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I figured it out myself. I modified the category.php file. I took the code from the _template.php file, and replaced this code: [code][/code] after [code][/code] and put that all into the category.php file. So now the category.php file looks like this: [code]ID))) $fboxes_template = true; else $fboxes_template = false; ?>
id="fullwidth" class="contentcontainer fix">
id="post-">
ID)): // Thumbnails ?>
ID)): // Post and Page Content ?>
Continue reading »

',TDOMAIN)); ?> Pages:', TDOMAIN), '

', __('number', TDOMAIN)); ?> ', '

'); ?>
'); ?>
">

[/code] Everything seems to be working fine now. Any reason this isn't a good idea?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Nick, If its working that's great. The only reason it's not recommended to edit core files is that most of the time it causes issues and when there is an update to the theme. The changes made will be overwritten. In your case I think you'll be fine, good job and thanks for informing us the issue is now resolved. We appreciate it. **On a sidenote, if you're ever going to be adding that amount of code in a post again, I recommend you use our Paste site. http://paste.pagelines.com/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0