Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8221013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:45:05+00:00 2026-06-07T13:45:05+00:00

I have successfully created a custom taxonomy in WordPress, and I created a page

  • 0

I have successfully created a custom taxonomy in WordPress, and I created a page that lists all of the posts under a specified taxonomy, with a file named taxonomy.php. It works, but some of the php isn’t printing any text. The page seems to churn out some php errors with error reporting turned on:

Notice: Undefined variable: term_name in WEBSITE_ROOT/themes/starkers/taxonomy.php on line 24

The variable is $term_name. Here is the code I have in my taxonomy.php page. I followed this tutorial. I thought I followed the tutorial pretty well.

<?php

get_header(); ?>

<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?>

            <h1><?php
                printf( __( 'Posts classified under: %s', 'starkers' ), '<span>' . $term_name . '</span>' );

            ?></h1>

            <?php
                $category_description = category_description();
                if ( ! empty( $category_description ) )
                    echo '' . $category_description . '';

            get_template_part( 'loop', 'category' );
            ?>


<?php get_footer(); ?>

Basically, it’s not printing the taxonomy name after “Posts classified under:”

I tried fiddling around with the code, but no luck. If it helps, here is the code I used for functions.php to registering the taxonomy:

add_action( 'init', 'build_taxonomies', 0 );

function build_taxonomies() {
register_taxonomy(
    'quotees',
    'post',
    array(
        'hierarchical' => false,
        'label' => 'quotees',
        'query_var' => true,
        'public' => true,
        'rewrite' => true
    )
);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:45:07+00:00Added an answer on June 7, 2026 at 1:45 pm

    If you look in the comments, apparently $term_name should be $term->name. In fact, most of the $term_blahs should be $term->blah.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have successfully created an app that reads from a bundled .plist file and
Good morning, I've successfully created a little app that registers itself under a custom
I have created a custom SharePoint web service that was deployed to, and successfully
I have created a custom listview that is populated using a row.xml file. Each
I have successfully created a custom Facebook open graph action, and have been able
I have successfully created a feature in sharepoint that modifies the existing edit dialog
I have created many TestProjects with Visual-Studio-2010 Ultimate . All tests were executed successfully
I have a custom UITableViewCell which I created in Interface Builder. I am successfully
I have created custom workflow and successfully deployed it on Alfresco. I just copied
I have created custom build tasks in my project file to run my nUnit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.