New Category Won’t Show Up
-
Hello,
Regarding my site growhotpeppers.com, I just went into my Dashboard and added a new category using Posts > Categories. Now, I have a blank space right in the middle of my page and I have no idea why this is not showing up. I made sure to add a unique name, slug and description.
Is there another area in the Dashboard that I need to edit?
Thanks for any help you can provide.
-
Have you actually added a post to this actegory yet? – Some themes have a ‘do not display unless they have posts assigned’ code to them…
Yes, I did.
I just brought up my home page and look at the source code and I see that the category link is there, but that it is not enclosed in the CSS that the other category links are so maybe that’s why it’s not visible. I just can’t figure out what file this is that is controlling the main page or where to get to it on dashboard.
Thanks for your time.
Did you build this theme or purchase it? if you purchased can you direct us to the download so that we can check the code.
You can access your theme from dashboard by going to Appearance > Editor to search for the file. Looks like may be a custom homepage file (but you can check which file it is by going to pages and checking which template file the ‘home’ page uses)…..
If you are going to make any changes TAKE A BACKUP OF ALL WORKING FILES FIRST!
looking at the source code – it isn’t actually grabbing a category but it is showing the template for that bar.
Good luck
I actually paid someone to build this website and, as I understand it, she purchased this premium arthemia theme. I can’t ask her about how she set this up because she abandoned the project, without giving me any information, and I’m still trying to figure how she set everything up.
Thanks for the suggestion about the Appearance > Editor. I did check all my theme’s pages there, but I could not find the code that controls categories. Also, under the “Pages” section, I don’t have a “home” page, just the names of the content that appear in the menu bar.
You mention a download if purchasing an arthemia theme. Is this download all of the files that she might have uploaded to my Web host?
I contacted the Colorlabs that makes this theme and I’m really hoping they can help me sort this out.
Thanks for your help.
That’s not very professional of your web developer!…
If you don’t have a homepage under pages – then it is most likely to be index.php file where this code appears (but without knowing the theme I cant say for sure).
If there is no code there referencing categories it may be this was built as a special function? Hopefully the people you bought the theme from can help… If you can – paste the index.php and functions.php pages here – maybe someone in the forum can spot the issue…Firefox/Firebug shows that it is an empty category; the css is there and all the rest identical to the other categories but no title and no link. It is cat-3
So please verify if the one post you made has the status “published”.Sheried, I agree. I just hope she doesn’t do this to someone else. I know HTML/CSS, but have never worked with WordPress before so this whole thing has been so confusing!
The first file below is the index.php and the second is the functions.php. If anyone spots the problem, please let me know. I haven’t been able to get a response from Colorlabs. Thanks!
<?php get_header(); ?> <?php if(!is_paged()) { ?> <div id="top" class="clearfloat"> <div id="headline"> <img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/headline.png" width="75px" height="21px" alt="" /> <?php query_posts("showposts=1&category_name=Headline"); ?> <?php while (have_posts()) : the_post(); ?> <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div> <div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div> <?php $values = get_post_custom_values("Headline");?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=300&h=275&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="300px" height="275px" /></a> <?php the_excerpt(); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Read the full story »</a> <?php endwhile; ?> </div> <div id="featured"> <img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/featured.png" width="72px" height="17px" alt="" /> <?php query_posts("showposts=4&category_name=Featured"); $i = 1; ?> <?php while (have_posts()) : the_post(); ?> <div class="clearfloat"> <?php $values = get_post_custom_values("Image"); if (isset($values[0])) { ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=100&h=65&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="100px" height="65px" /></a> <?php } ?> <div class="info"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a> <div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div> </div> </div> <?php endwhile; ?> </div> </div> <div id="middle" class="clearfloat"> <img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/category.png" class="clearfloat" alt="" /> <?php $display_categories = array(20,22,7,21,23); $i = 1; foreach ($display_categories as $category) { ?> <div id="cat-<?php echo $i; ?>" class="category"> <?php query_posts("showposts=1&cat=$category")?> <span class="cat_title"><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></span> <a href="<?php echo get_category_link($category);?>"><?php echo category_description($category); ?></a> </div> <?php $i++; ?> <?php } ?> </div> <?php } ?> <div id="bottom" class="clearfloat"> <div id="front-list"> <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=-27,-28&paged=$page&posts_per_page=5"); ?> <?php while (have_posts()) : the_post(); ?> <div class="clearfloat"> <h3 class=cat_title><?php the_category(', '); ?> »</h3> <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div> <div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div> <div class="spoiler"> <?php $values = get_post_custom_values("Image"); if (isset($values[0])) { ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=150&h=150&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="150px" height="150px" /></a> <?php } ?> <?php the_excerpt(); ?> </div> </div> <?php endwhile; ?> <div class="navigation"> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?> <?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?> <?php } ?> </div> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?>
<?php if ( function_exists('register_sidebar') ) { register_sidebar(array('name' => 'Sidebar Top','before_widget' => '','after_widget' => '','before_title' => '<h3>','after_title' => '</h3>')); register_sidebar(array('name' => 'Sidebar Left','before_widget' => '','after_widget' => '','before_title' => '<h3>','after_title' => '</h3>')); register_sidebar(array('name' => 'Sidebar Right','before_widget' => '','after_widget' => '','before_title' => '<h3>','after_title' => '</h3>')); register_sidebar(array('name' => 'Sidebar Bottom','before_widget' => '','after_widget' => '','before_title' => '<h3>','after_title' => '</h3>')); register_sidebar(array('name' => 'Footer Left','before_widget' => '','after_widget' => '','before_title' => '<h3>','after_title' => '</h3>')); register_sidebar(array('name' => 'Footer Center','before_widget' => '','after_widget' => '','before_title' => '<h3>','after_title' => '</h3>')); register_sidebar(array('name' => 'Footer Right','before_widget' => '','after_widget' => '','before_title' => '<h3>','after_title' => '</h3>')); } remove_filter('get_the_excerpt', 'wp_trim_excerpt'); add_filter('get_the_excerpt', 'custom_trim_excerpt'); remove_filter('get_the_excerpt', 'wp_trim_excerpt'); add_filter('get_the_excerpt', 'custom_trim_excerpt'); function custom_trim_excerpt($text) { // Fakes an excerpt if needed global $post; if ( '' == $text ) { $text = get_the_content(''); $text = strip_shortcodes( $text ); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $text = strip_tags($text); $excerpt_length = apply_filters('excerpt_length', 90); $words = explode(' ', $text, $excerpt_length + 1); if (count($words) > $excerpt_length) { array_pop($words); array_push($words, '...'); $text = implode(' ', $words); } } return $text; } ?>
henkholland, thanks for your suggestion. Yes, I verified that my post under cat-3 is published.
I really appreciate the help.
<?php $display_categories = array(20,22,7,21,23); $i = 1;
This is related but I think these numbers do not correspond to your cat-1, cat-2, cat-3 etc directly.
First try for your Arthemia theme to find in WP Dashboard a theme options/settings page. I believe it has one. Can you assign your new category in there to cat-3?
Otherwise, compare the array numbers with your category-id’s; the ones you see in the bottom bar when you hover the mouse pointer over the categories in Dashboard/Posts/Categories
Thank you henkholland. I wasn’t able to find an options/settings for the Arthemia theme in the Dashboard, but I did hover over the categories to get the category-id number (78) so I added this to my index.php file.
Now, the category is finally showing up on the page, but the CSS is not taking effect. Looking at the style sheet, I was able to determine that this would be “cat-3” in the CSS.
Any idea how I can get the style to apply to this category? I’m looking over the index.php file and am not seeing where to hook them up.
Thank you again for helping me out. I really appreciate your time.
Hi Jenjeant,
Is “The Chili Pepper Kitchen” your new category nr 78? It is now assigned to cat-6 and it shows at the right hand side under cat-5, not nice.
Where did you put 78 in the index.php? In place of the 7?
And did the other category nrs correspond with the numbers in the array?So did you write array(20,22,7,21,23,78)
or
array(20,22,78,21,23)
or something else?Hi henkholland,
Yes, “The Chili Pepper Kitchen,” is the new category 78. I didn’t realize it had switched from cat-3 to cat-6.
I wrote the 78 just after the 23 number so that it is: (20,22,7,21,23,78).
And yes, the other category nrs matched the array.
Thank you.
You have to try out this way just to see what happens:
array(20,22,78,21,23)
Numbers in the Array are going to matter so text will display properly.
I agree with Richard; write array(20,22,78,21,23) after finding out if there was a category nr 7 (I think not or it was a category with no posts in it, because it did not show).
You all are fantastic!!!
richardginn and henkholland, I tried the array as you suggested and now my page looks good! I can’t thank you all enough for your time… it is truly appreciated.
Enjoy your weekend!
- The topic ‘New Category Won’t Show Up’ is closed to new replies.