Title: function not working???
Last modified: August 20, 2016

---

# function not working???

 *  [cm123077](https://wordpress.org/support/users/cm123077/)
 * (@cm123077)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/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](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!
 * [http://www.listdoodle.com](http://www.listdoodle.com)
 *     ```
       <!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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [cm123077](https://wordpress.org/support/users/cm123077/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/function-not-working/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
