How to remove City, Region, Country, Zip Code from Adress in Archive Page.

This topic contains 18 replies, has 4 voices, and was last updated by  Alex Rollin 4 years, 11 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #498102

    jotomas
    Buyer
    Post count: 802

    Hello,

    I have two CPTs with the same settings for the Adress field.

    CPT Habitatge i Allotjament Archive Page shows City, Region, Country and Zip Code in the Adress (screenshot attached).

    CPT Menjar i Beure Archive Page does not show City, Region, Country and Zip Code in the Adress (screenshot attached).

    I would like to remove City, Region, Country, Zip Code from Adress in CPT Habitatge i Allotjament Archive Page.

    I can not remember how I did it with CPT Menjar i Beure, most probably with GD V1.

    Can you help?

    I look forward to your reply.

    Thank you very much for your help.

    Best regards.

    #498121

    Kor
    Moderator
    Post count: 16516

    Hi there,

    Thanks for your post. Could you try editing your “Archive Item Template” and try removing the address from the listings? https://wpgeodirectory.com/docs-v2/templates/archive-item/

    #498184

    jotomas
    Buyer
    Post count: 802

    Hi Kor,

    Thank you very much for your reply.

    I tried editing the “Archive Item Template”, that looks like this since I got my GD V1 site migrated to GD V2 by one of the GD Experts:

    [gd_archive_item_section type=’open’ position=’left’] [gd_post_images type=’image’ ajax_load=’true’ link_to=’post’ show_logo=’true’ ] [gd_archive_item_section type=’close’ position=’left’] [gd_archive_item_section type=’open’ position=’right’] [gd_post_title tag=’h2′] [gd_post_distance][gd_archive_item_section type=’close’ position=’right’] [gd_post_meta key=”address” show=”icon-value” alignment=”left” text_alignment=”left”] [gd_author_actions author_page_only=’1′] 

    If I remove the adress shortcode [gd_post_meta key=”address” show=”icon-value” alignment=”left” text_alignment=”left”] from the template, the adress does not show at all.

    The issue seems to be related to CPT Custom Field Adress settings that are not correctly applied.

    For both CPTs I have the same settings:

    – Ticked: show City and Neoghborhood.
    – Unticked: show Region, Country and Zip Code.

    However:

    – CPT “Habitatge i Allotjament” shows Region, Country and Zip Code.
    – CPT “Menjar i Beure” does not show Region, Country and Zip Code.

    Another problem is that it seems that unticking “City” is not saved, since it appears always ticked when opening again CPT Custom Fields settings, however “City” does not show even when it is ticked. This has been tested only for CPT “Menjar i Beure”.

    I look forward to your news.

    Thank you very much once again for your help.

    Best regards.

    #498237

    Paolo
    Site Admin
    Post count: 31206

    Is it possible that you have an archive item template for each CPT?

    Did you check that?

    #498265

    jotomas
    Buyer
    Post count: 802

    Hi Paolo,

    Thank you very much for your response.

    Yes, I checked it, both CPT have the Default Archive Item page set.

    In fact, changes made in the part show=”icon-value” of the shortcode [gd_post_meta key=”address” show=”icon-value” alignment=”left” text_alignment=”left”] of the Default Archive Item page show in both CPTs.

    I look forward to your news.

    Thank you very much once again for your help.

    Best regards.

    #498267

    Paolo
    Site Admin
    Post count: 31206

    Please provide link and credentials and we’ll have a look.

    Thanks

    #498269

    jotomas
    Buyer
    Post count: 802
    This reply has been marked as private.
    #498286

    Alex Rollin
    Moderator
    Post count: 27815

    I have updated it, please check.

    #498327

    jotomas
    Buyer
    Post count: 802
    This reply has been marked as private.
    #498367

    Alex Rollin
    Moderator
    Post count: 27815

    Check your GD Archive Item template to see changes.

    Your earlier template was create before the GD Post Address element was released. We are always releasing new features and taking advantage of them means editing the templates to include new elements that work with your site, the way you want it.

    #498375

    jotomas
    Buyer
    Post count: 802

    Hi Alex,

    Thank you very much for your reply.

    I am sorry, I do not understand what you mean. I have just checked now the GD Archive Item template and I do not see any change, since I see exactly the same than before:

    [gd_archive_item_section type=’open’ position=’left’] [gd_post_images type=’image’ ajax_load=’true’ link_to=’post’ show_logo=’true’ ] [gd_archive_item_section type=’close’ position=’left’] [gd_archive_item_section type=’open’ position=’right’] [gd_post_title tag=’h2′] [gd_post_distance][gd_archive_item_section type=’close’ position=’right’] [gd_post_meta key=”address” show=”icon-value” alignment=”left” text_alignment=”left”] [gd_author_actions author_page_only=’1′] 

    I look forward to your news.

    Thank you very much once again for your help.

    Best regards.

    #498383

    Alex Rollin
    Moderator
    Post count: 27815

    You can use the GD Post Address element where you like to display the address as you like.

    Use the shortcode builder and adjust the template field

    #498384

    jotomas
    Buyer
    Post count: 802

    Hi Alex,

    Ok, I see now. You made the changes in the live site, not in the staging site.

    Thank you very much for your help.

    Best regards.

    #498390

    jotomas
    Buyer
    Post count: 802

    Hi Alex,

    However, the issue with Adress Tab settings in Detail Page persists.

    For both “Habitatge i Allotjament” and “Menjar i Beure” CPTs I have the same settings:

    – Ticked: show City and Neighbourhood.
    – Unticked: show Region, Country and Zip Code.

    However, both CPTs Adress Tab in Detail Page show Adress, City and Neighbourhood, but:

    – CPT “Habitatge i Allotjament” does show also Region, Country and Zip Code, while they should not show.
    – CPT “Menjar i Beure” does not show Region, Country and Zip Code, which is correct.

    Another problem is that it seems that unticking “City” is not saved, since it appears always ticked when opening again CPT Custom Fields settings, however “City” does not show even when it is ticked. This has been tested only for CPT “Menjar i Beure”.

    I look forward to your news.

    Thank you very much once again for your help.

    Best regards.

    #498397

    Alex Rollin
    Moderator
    Post count: 27815

    Editing the display of the address in the SD Details area of the GD Single template is outside of support. We can provide CSS to hide features there:

    To hide the address use the following CSS:

    
    
    
    .sd .sd-address {
        color: #82888a;
    }
    

    That will hide it on every CPT and you will need to target it further to hide it in select areas.

    For displaying the address as per your requirements on the details page, you can use GD Post Address there, too. As a widget, a shortcode in the template, or in a tab.

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

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

Open Support Ticket