listing/category title in template

This topic contains 19 replies, has 3 voices, and was last updated by  Stiofan O’Connor 7 years, 2 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #413737

    Dimitris
    Free User
    Post count: 11

    The template I’m using is displaying the page (etc) title on the header.
    While individual places have no problem, categories/listings don’t display their title.

    The template is using this code

    
    
    } else if (is_singular()){
    	echo get_the_title();

    to display the title for the pages, and it’s the same that affects the individual listings.
    How can I have the category title displayed as well?

    #413830

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    Thanks for writing in today with your question.

    You can have a look at this thread here:

    https://wpgeodirectory.com/support/topic/display-category-title/

    It’s a customization you can do yourself now or wait and see when GDV2 is released.

    Thanks

    #413868

    Dimitris
    Free User
    Post count: 11

    Thank you for your answer… I’m afraid I can’t make it work…
    My wordpress knowledge is pretty limited 🙁

    #413925

    Alex Rollin
    Moderator
    Post count: 27815

    Do you have the category description showing now?

    Please share a link to an example page, and then the following information so we can take a look.

    WordPress Credentials
    WP Admin URL:
    WP Admin Username:
    WP Admin Password:

    FTP Credentials
    FTP Host:
    FTP Port:
    FTP User:
    FTP Password:

    #414064

    Dimitris
    Free User
    Post count: 11

    I’ve posted the details as a private reply, not sure if they got through…

    #414130

    Dimitris
    Free User
    Post count: 11

    I tried posting yesterday but I don’t think the posts went through…I’ll try again

    #414131

    Dimitris
    Free User
    Post count: 11
    This reply has been marked as private.
    #414137

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #414138

    Alex Rollin
    Moderator
    Post count: 27815

    Hello!

    I added a category description and it shows on the category listing page.

    Places > Place Categories > Category > Description

    I added an H2 and P. You can customize your own CSS to change the display.

    Add custom CSS at GD > Design > Scripts > CSS

    See this page for more details about adding custom CSS:

    https://wpgeodirectory.com/docs/customizing-your-style/

    An example:

    
    
    
    .term_description h2 {
        font: ultra-condensed italic small-caps bold 44px Georgia, sans-serif;
    }
    

    Let us know if you have any questions about that

    #414170

    Dimitris
    Free User
    Post count: 11

    Thank you but that is not what I meant. The title was displaying at that part and I removed it through css.

    My problem is that in my theme, title are displayed on the top. Over the header image. The geodirectory category doesn’t.

    Please see the attached

    In the forum link you’ve sent me, there was a link to another thread with similar info, and that’s what I tried to use, but apparently I failed :/

    #414230

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #414269

    Dimitris
    Free User
    Post count: 11
    This reply has been marked as private.
    #414348

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Your theme author needs to add one more check to the /parts/title.php around line 34

    
    
     else if( is_post_type_archive() ){
    			post_type_archive_title();
    		}

    I have added this for you, you should either move this file to your child theme or get the theme author to add it to his/her theme.

    Thanks,

    Stiofan

    #414398

    Dimitris
    Free User
    Post count: 11

    Thank you I have added that to the child theme.
    This code gives the title “places”. What if I want the category name as title? For example “shop” or “eat & drink”?

    #414402

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Ah sorry i thought that was ur root page at first glance.

    I have chnaged it to

    
    
     else if( is_tax() ){
    			single_term_title();
    		} else if( is_post_type_archive() ){
    			post_type_archive_title();
    		}

    Thanks,

    Stiofan

Viewing 15 posts - 1 through 15 (of 20 total)

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount