Display Category Title

This topic contains 3 replies, has 2 voices, and was last updated by  Simone 8 years, 8 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #45654

    vicki
    Buyer
    Post count: 76

    I’m using the Avada theme and the entry_title for all the category pages is the default post type name (I changed “Places” to “Listings”). Here’s an example.

    http://rawfood.wpengine.com/listings/attractions/

    I’d like to display the category name on these pages either in the Page Title Bar or below it just above the category description.

    I read this thread

    https://wpgeodirectory.com/support/topic/change-entry-title-for-category-pages/#post-31196

    and played around with the page_title function, but I’m not sure what I’m doing and nothing I tried worked.

    Might it be easier to edit a template to add a heading just above the category description? If so, which template and what code should be added to pull the category name?

    #45677

    Simone
    Expired Member
    Post count: 3515

    Hello, why don’t you edit the category description (editing the Categories in your post type’s category settings e.g. Place/Place Categories) making it H3, so where you have “Here is a description of the Attractions category” you will have the name of the category.

    
    
      add_action( 'geodir_listings_page_title', 'my_geodir_action_listings_title', 10 );
                                      
                                      function my_geodir_action_listings_title() { echo "<div style=width:1040px;>show category name here</div>"; }

    Or, you can add in your functions.php a function as stated in the thread you mentioned before

    
    
      add_action( 'geodir_listings_page_title', 'my_geodir_action_listings_title', 10 );
                                      
                                      function my_geodir_action_listings_title() { echo "<div style=width:1040px;>show category name here</div>"; }
    or here if you want it below the category description
    
     add_filter('geodir_before_listing_listview','categoriaa');
                                      function categoriaa() {
    echo "show category name here";
    
                                     }
    
    

    (note, the two functions are missing of the code to show the category)

    #45738

    vicki
    Buyer
    Post count: 76

    Wow, editing the description to include the title is so easy, and “doh!” I missed that option entirely. Thanks, that looks like it will work.

    #45739

    Simone
    Expired Member
    Post count: 3515

    Glad we sorted out in the easy way 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket