Single.php Overriding Custom Fields in Other Pages
-
Hello-
I’m using a theme (WPESP) that is primarily a portfolio theme. It didn’t come with traditional blogging capabilities. The portfolio is made up of a series of posts. Each of those posts handles each individual piece of work. Each post has a series of custom fields that handle descriptions and images. From the main portfolio page, you can click on any individual piece of work and go to the “case study” page. Here’s a sample screenshot of how it’s supposed to look:
http://smswebdevelopment.com/wordpress/wp-content/themes/wpesp-portfolio/style/images/caseStudy.jpg
I decided to do a workaround to incorporate a blog into this site. I’m using a plug-in called “bloginblog” to link in posts from the category “blog” into a static page caled “blog”. All worked great at this point – no conflicts with the plug-in. To handle commenting, I had to add in comments.php and single.php, which did not come with the theme. At any rate, I massaged these file to handle commenting for “blog” and all works great.
Here’s where my issue started: When I go to the “case study” page from the portfolio, single.php has replaced all of the custom fields and sidebar.
I tried using a conditional statement in single.php:
<?php if( in_category('blog') ): ?><?php comments_template(); ?><?php endif; ?>All this did was remove the comments template. There is still something within single.php that is taking precedence over the case study page. See here:
http://smswebdevelopment.com/wordpress/?p=17
How can I get single.php to only work with the “blog” category and not override the “case study” page? Any help is greatly appreciated!
Thanks!
Steven
The topic ‘Single.php Overriding Custom Fields in Other Pages’ is closed to new replies.