Support » Theme: Elicit » Tags not showing up on single page

  • Resolved figure2

    (@figure2)


    Greetings,

    Thanks for your help on my category navigation question.Just to preface my question, I am using a child theme of the Elicit theme, have changed it quite a bit and am asking for help on a custom post type “single” page. I thought I would start by asking for help here, even if this is beyond the scope of your assistance.

    That said, this is one of many of the single pages for my small_business custom post types: http://scasbog.raddaddesign.com/small_business/general-contractor/
    It uses most of the structure of Elicit’s single.php file. The main difference is that the content is created by two Advanced Custom Fields WYSWYG text fields instead of the main visual editor.

    I was able to set up categories and tags on my small_business custom post type and both work fine in the editor: Editor page for small_businedd custom post type

    The categories display fine as seen in the text “Business type: Contracting & Repair

    The tags on the other hand don’t display at all. I added my own text to the div tag with the .post-tag class to be sure it wasn’t hidden in any way:

    <div class="post-tag">
    		The tags should be showing up here.<?php the_tags(__('Tags', 'elicit') . ' ', ' ', ' '); ?>
    	</div>

    Tags should be showing up here.

    My text shows up but not the tags associated with the post.

    Any idea how I can resolve this?
    <hr />
    The code for my small_business custom post type is below in case you spot a problem:

    <?php
    /*
    Plugin Name: Stratford Small Business
    Plugin URI: http://www.markhannondesign.com/
    Description: Declares a plugin that will create a custom post type displaying small business profiles.
    Version: 1.0
    Author: Mark Hannon
    Author URI: http://www.markhannondesign.com/
    License: GPLv2
    */
    ?>
    <?php
    
    add_action( 'init', 'create_small_business' );
    
    function create_small_business() {
        register_post_type( 'small_business',
            array(
                'labels' => array(
                    'name' => 'Small Businesses',
                    'singular_name' => 'Small Business',
                    'description' => __( 'This post type is for the creation and display of small businesses on the SCASBG web site' ),
                    'add_new' => 'Add New',
                    'add_new_item' => 'Add New Small Business',
                    'edit' => 'Edit',
                    'edit_item' => 'Edit Small Business',
                    'new_item' => 'New Small Business',
                    'view' => 'View',
                    'view_item' => 'View Small Business',
                    'search_items' => 'Search Small Businesses',
                    'not_found' => 'No Small Businesses found',
                    'not_found_in_trash' => 'No Small Businesses found in Trash',
                    'parent' => 'Parent Small Business',
                    'show_ui' => true,
                    'show_in_menu' => true,
                    'show_in_admin_bar' => true,
                    'featured_image' => __( 'Featured Image' ),
    				'set_featured_image' => __( 'Set featured image' ),
    				'remove_featured_image' => __( 'Remove featured image' ),
                ),
     
                'public' => true,
                'menu_position' => 15,
                'supports' => array( 'title', 'editor', 'comments', 'thumbnail', 'custom-fields' ),
                'taxonomies' => array( 'category' ),
                'menu_icon' => 'dashicons-store',
                'has_archive' => true
            )
        );
       register_taxonomy('tag','small_business',array(
        		'hierarchical' => false,
        		'labels' => $labels,
        		'show_ui' => true,
        		'update_count_callback' => '_update_post_term_count',
        		'query_var' => true,
        		'rewrite' => array( 'slug' => 'tag' ),
      	));
    
    }
    
    ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Tags not showing up on single page’ is closed to new replies.