Jump to content
Sign in to follow this  
yetiboy

Category pages - post titles only showing, no content

Recommended Posts

yetiboy

I've just upgraded to the most recent version of WordPress, and as soon as I did that my category pages seem to have been screwed up. The main page shows the posts including full text. However, when I go to one of the category pages, only the title section for each post appears. I tried switching themes (from EcoPro to twenty-ten) and it works fine on that theme. Anyone else encountering this? http://www.rmss.ca Note: I have restricted the categories appearing on the front page using a bit of php code - I tried removing that and it didn't make a difference, in case anyone notices it.

Share this post


Link to post
Share on other sites
kastelic

As many of you know, WP 3.1 had some pretty major changes to it. I will forward this to the developers, thanks.

Share this post


Link to post
Share on other sites
yetiboy

Should we expect some sort of version update once this is fixed? If so, how will we be informed?

Share this post


Link to post
Share on other sites
cmunns

Honestly, the focus right now is making EcoPro a child theme of PlatformPro not updating EcoPro itself if that makes sense. If possible can you downgrade WP or do you need something in the update?

Share this post


Link to post
Share on other sites
yetiboy

I actually don't need anything in the upgrade that I'm aware of. How difficult is it to downgrade?

Share this post


Link to post
Share on other sites
bryan-hadaway

One should always back everything up before serious upgrades like this. Essentially, you would have had to back everything up before hand so that you could revert back to those settings, files and db. Thanks, Bryan

Share this post


Link to post
Share on other sites
yetiboy

Actually didn't turn out to be overly difficult, even without having a backup (I know, stupid me). However, it turns out that the issue wasn't actually with 3.1. I'm going to end up merging two different threads with this. The problem is with my front page query_post. I've altered it using the link Adam gave me to allow pagination, and that has worked, but it seems that doing this is the culprit. I'm using the following code:

<?php if (is_home()):
		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query->query('cat=26&paged='.$paged);
		elseif (is_category('20')) :
		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query->query('cat=20&paged='.$paged);
		elseif (is_category('25')) :
		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query->query('cat=25&paged='.$paged);
		elseif (is_category('24')) :
		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query->query('cat=24&paged='.$paged);
		elseif (is_category('22')) :
		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query->query('cat=22&paged='.$paged);
		elseif (is_category('19')) :
		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query->query('cat=19&paged='.$paged);
		elseif (is_category('23')) :
		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query->query('cat=23&paged='.$paged);
		endif; ?>

Note: For whatever reason, I need one for each category otherwise when I click on category links they all just show my front page category. Anyone want to take a stab at this one?

Share this post


Link to post
Share on other sites
cmunns

You could try just adding `wp_reset_query();` after the modified loop instead of copying all those other categories.

Share this post


Link to post
Share on other sites
yetiboy

That fixed the need for putting in all of the elseif's, thanks Adam. I'm still left with my original problem though. For whatever reason, the content of posts isn't showing up. All I get is the title section. If I remove the php code above, my front page will show full posts but none of the category pages will (only show title sections). If I leave the php in, my front page also doesn't show full posts. I've tried deactivating all plugins and still have the same problem.

Share this post


Link to post
Share on other sites
cmunns

Have you explicitly entered an excerpt for each post? Try that and let's see what happens.

Share this post


Link to post
Share on other sites
bryan-hadaway

Okay, hold tight for further help. Thanks, Bryan

Share this post


Link to post
Share on other sites
yetiboy

I've narrowed the problem down to changes I've made - I just tried switching to the standard EcoPro theme, and the posts show up. So that means it's something in one of child files or files I've added to the library. I'm going to try to figure it out and I'll let you know what happens.

Share this post


Link to post
Share on other sites
yetiboy

After going through my changes, I'm still stumped. Here is what I've changed (I'll list original first, my change second in instances that I've altered code as opposed to adding code): _template.php:

<?php if(!$full_width_page) get_template_part('library/template_sidebar');?>
changed to
<?php if(!$full_width_page) get_template_part('library/template_sidebar_rmss');?>
	
template_sidebar_rmss.php is identical to template_sidebar.php except for the following:
<?php if ((!is_category('26')) && (!is_single())) get_template_part('library/sidebar_nav') ?>
added after
<?php if(VPRO) get_template_part('library/_grandchildnav_pro');?>
	
(I tried removing this, didn't make a difference). _theloop.php: removed:
<?php if(is_single()): // Post to Post Navigation?>
					<div class="post-nav fix"> <span class="previous"><?php previous_post_link('%link') ?></span> <span class="next"><?php next_post_link('%link') ?></span></div>
				<?php endif;?>
added to top:
<?php if (is_home()):
		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query->query('cat=26&paged='.$paged);
	endif; ?>
	<?php wp_reset_query(); ?>
footer.php:
<?php wp_nav_menu( array( 'container_class' => '', 'container' => null, 'menu_class' => 'footer_nav','theme_location' => 'footer_social' ) ); ?>
changed to
	ul>
	li>a href="http://www.rmss.ca/feed/">RSS/a>/li>
	/ul>
	
(Note: I had to remove the < in the above section for it to show up on here, I didn't actually forget it it in the real code) header.php: added:
<?php get_template_part("library/_contactinfo");?>
	
before
<div id="nav" class="clearfix">

for the wp_nav_menu section (_contactinfo.php just contains the contact information text in the header) The only other changes were some minor additions to style.css, nothing that would impact this.

Share this post


Link to post
Share on other sites
bryan-hadaway

Thanks Brad, gave you your first karma point for all the helpful info you shared. Anyways, hold tight for further developer help. Thanks, Bryan

Share this post


Link to post
Share on other sites
yetiboy

After battling for a while, I've figured out the cause of the problem - but not a solution. It turns out this is a result of my trying to restrict the home page to one category and still maintain pagination. I've tried using the the recommended page: link which did allow me to fix my pagination problem, but the result is only having the title section appear for my front page. Here is the code I currently have:

<?php if (is_home()):
		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query->query('cat=26&paged='.$paged);
	endif; ?>
	<?php wp_reset_query(); ?>

I've tried removing wp_reset_query, that didn't help. I've also tried every variation on this code that is found in the comments section of the link. Either the problem doesn't go away or the restriction doesn't work with the changes.

Share this post


Link to post
Share on other sites
cmunns

The query shouldn't actually remove/add elements the way you are using it. What does your _theloop.php file look like near `the_excerpt()` or `the_content()`?

Share this post


Link to post
Share on other sites
yetiboy
<?php if(pl_show_excerpt($post->ID)): // Post Excerpt ?>
	<div class="post-excerpt">
	<?php the_excerpt(); ?>
	</div>
		<?php  if(pl_show_content($post->ID)): // Post and Page Content ?>
					<div class="copy fix">
						<div class="textcontent">
							<?php the_content(__('Continue reading ?»',TDOMAIN)); ?>
							<div class="clear"></div>
							<?php if(is_single()) wp_link_pages(__('<p>Pages:', TDOMAIN), '</p>', __('number', TDOMAIN)); ?>
							<?php edit_post_link(__('Edit',TDOMAIN), '<p>', '</p>'); ?>
							<div class="clear"></div>
						</div>
		[/code]

This hasn't been altered from the original file.

Share this post


Link to post
Share on other sites
yetiboy

Any chance that there's a solution coming for this problem? I've tried a complete reinstall of WP 3.0.5 and I still have the issue. Unless there's something in the database from my original install that's causing this, it can only be EcoPro.

Share this post


Link to post
Share on other sites
cmunns

And Brad to confirm, you do have the correct "Page and Post" options set so that excerpts and thumbs are set to show on "all posts and blog pages"?

Share this post


Link to post
Share on other sites
yetiboy

Excerpts now show, I hadn't tried them since my post a week ago. I'm not using excerpts on my site, so I hadn't actually even thought of testing them out again. I'm assuming my re-install of 3.0.5 did this, since that is the only major change I've attempted since that post. Thumbnails do not show (I honestly don't even know what the thumbnails are), nor do full posts regardless of settings. I can toggle between having excerpts and not having them.

Share this post


Link to post
Share on other sites
bryan-hadaway

Feature thumbs are displayed for latest posts and are used for the carousel. They can be set for a post when editing that post. Where can't you get full content to display, on category pages? Thanks, Bryan

Share this post


Link to post
Share on other sites
yetiboy

Yes, it's all category pages. Single page posts are fine.

Share this post


Link to post
Share on other sites
cmunns

Well then you now have a consistent look. If you weren't using thumbnails then disregard that, but is this problem fixed? I'm not sure if you only trying to get the excerpts/content back?

Share this post


Link to post
Share on other sites
yetiboy

I WANT the content. As of now it doesn't appear on the main page or any category pages, only on single posts. I want it on all pages (ie. main page, category pages and single posts). As I said in the above post, it's because of the following:

<?php if (is_home()):
	$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query->query('cat=26&paged='.$paged);
	endif; ?>
	<?php wp_reset_query(); ?>

I've tried every variation from the link I included in the above post, in all cases either the filtering doesn't work and full content does (which is no good, I need only a specific category on the front page) or the filtering does work and content doesn't, only the title section from each post.

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  

×