• http://do.right.by/wordpress

    Hello,
    I am relatively experienced in theming for wordpress but I am having the strangest problem. I have a category.php file but it is simply not being applied. The only template that is working is index.php .

    I have no idea what I am doing wrong but my category permalink structure and child set up changed a lot until i got it how i wanted it.

    I am linking front page thumbnails to the category pages with this code in my loop.

    <div class="featuredthumbnail">
    	<?php
    		foreach((get_the_category()) as $category) {
    		$category_id = $category->cat_ID . ' ';
    		}
        	// Get the URL of this category
        	$category_link = get_category_link( $category_id );
    	?>
    	<a href="<?php echo $category_link; ?>">
    	<?php
     	$image_id = get_post_thumbnail_id();
     	$image_url = wp_get_attachment_image_src($image_id,'front_page');
     	$image_url = $image_url[0];
    	?>
    	<img src="<?php echo $image_url; ?>"></a>
    </div>

    It shouldn’t matter much though because it definitely links to the right url, it just looks exactaly like the index.php

    Any and all help is appreciated,
    Thanks much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Taylor Baybutt

    (@taxbax)

    Heres what I think the problem is.
    I made a custom taxonomy “project” and the changed my mind and decided to use categories. I made the category base “project” and my categories had the same names as when I made them as custom taxonomies. I am assuming the permalinks got screwed up in the SQL tables. Im poking around now, will update if i figure it out without reinstalling WP.

    Thread Starter Taylor Baybutt

    (@taxbax)

    yes, ok. so i dropped the tables in wp_terms and it delted my categories but now everything seems to be functioning correctly.

    Hope this helps someone oneday!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘category template not being applied, very strange.’ is closed to new replies.