category template not being applied, very strange. (3 posts)

  1. Taylor Baybutt
    Posted 5 years ago #


    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">
    		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; ?>">
     	$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>

    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.

  2. Taylor Baybutt
    Posted 5 years ago #

    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.

  3. Taylor Baybutt
    Posted 5 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic