function not working???
-
I am trying to display the category of a post with its parent categories, like they did here: http://codex.wordpress.org/Function_Reference/get_category_parents
I can not get this to work…error every time. Here is my code that works…but just displays the category, not the parents.
Can someone help me write this so it works, please? Thanks!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <?php if(is_single()) { ?> <title><?php the_title() ?></title> <?php } else if(is_search()) { ?> <title><?php bloginfo('blogname') ?> - search results</title> <?php } else { ?> <title><?php bloginfo('blogdescription') ?> - <?php bloginfo('blogname')?></title> <?php } ?> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <?php wp_head() ?> </head> <body> <div id="breadcrumb"> <a href="<?php bloginfo('home') ?>"><?php bloginfo('blogname')?></a> <?php if(is_category) if(is_single()) { echo ' > '; ?> <a href="<?php the_permalink() ?>"><?php the_category(' > '); ?></a> <?php } ?> </div> <div id="searchbox"> <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/"> <label for="s">search for: </label> <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Search" /> </form> </div> <p>[ <?php echo date('D, j F H:i:s') ?> ]</p>
The topic ‘function not working???’ is closed to new replies.