Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Categories only displaying home page (http://forum.bytesforall.com/showthread.php?t=14715)

Tim F Jun 20, 2011 04:14 AM

Categories only displaying home page
 
Hey all,

I am finding across several of my sites that when I click the link to view a category, I am being taken to the url for that category but only being shown the exact home page.

I posted about this problem before here and Juggledad helped me track it down to the simple tags plugin. However this is ocurring on other sites that don't use this plugin - I have disabled every plugin with no luck. Here's an example: http://www.luckydragonstudio.com/cat...ack-and-white/
This site uses a custom category.php to display the posts in a category in a grid layout. I created category.php by copying the contents of index.php, then adding a few bits. It worked fine for ages, and the only changes I've made since then is upgrading to the latest version of wp. I'm using atahualpa 3.5.1. I have another site with the same problem which isn't using any plugins and isn't using a custom category.php.

Has anyone else experienced anything like this? I can't provide any more details about the exact site setup today as I'm away from home and don't remember my passwords! But thought I'd see if anyone has ideas.

juggledad Jun 20, 2011 05:57 AM

first question I have is what happens it you remove the custom category.php? do they work then?

Tim F Jun 20, 2011 08:35 AM

I'll need to double check on Wed when I can get to my psswords to be sure but I'm 95% that this site that has the same problem had it with no custom category.php and no plugins active whatsoever. I will confirm when I'm home though.

Tim F Jun 22, 2011 08:58 AM

OK I'm good at this hey - I realised that the problem with my first site above was the same plugin which I swore I wasn't using but hadn't checked as I was away. I upgraded that and the site is now working again. Facepalm.

However the second site is still having the problem, rendering the home page at category URLs. I've tried disabling all plugins (really this time) and removed the custom category.php I was trying so it has to be something I've edited in the theme. I have made quite a few changes so this might be too much trouble to pinpoint but can anyone see any issues with the following? I was trying to use these instructions to add rich snippets markup together with a star rating for my review posts. I've obviously broken something but have been playing for a couple of hours and can't spot it. I was leaning towards the div tag I added below needing to come out of index.php and go somewhere else.

I added this to functions.php:

Code:

<?php
function hreview_echo($val) {
  global $post;
  $rating = get_post_meta($post->ID, 'rating', true);
  if ($rating) {
    echo $val;
  }
};
function display_hreview_rating() {
  global $post;
  $rating = get_post_meta($post->ID, 'rating', true);
  if ($rating) {
?>
    <div class="rating">
      My rating:
      <span class="value-title" title="<?php echo $rating; ?>"/>
    </span></div>
    <div title="<?php echo $rating; ?> out of 5 stars" class="rating_bar">
      <div style="width:<?php echo ($rating*20); ?>%"></div>
    </div>
<?php
  }
  return $output;
}
?>

This to index.php, just after get_header(); ?>
Code:

<div class="post<?php hreview_echo(' hreview'); ?>">
And then closed the div after bfa_center_content($bfa_ata['content_below_loop']); ?>

The bolded bit below to bfa_post_parts
Code:

if ( (!is_single() AND !is_page()) OR $bfa_ata_display_body_title == '' ) {
               
               
                echo $before; ?>
                <h<?php echo $bfa_ata['h_posttitle']; ?><?php hreview_echo(' class="item fn entry-title"'); ?>><?php

This to css inserts
Code:

.rating {
  float: left;
  margin-right: 10px;
}
.rating_bar {
  float: left;
  width: 55px;
  background: url(images/stars.gif) 0 0 repeat-x;
}
.rating_bar div {
  height: 12px;
  background: url(images/stars.gif) 0 -13px repeat-x;
}

And also added some formatting to the post/page info items.


All times are GMT -6. The time now is 04:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.