Forum: Bug Reports

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support and general questions related to GEO my WP plugin and its core add-ons please use the support forum.

[Resolved]Single Location not showing in Taxonomy archive

Home Forums Bug Reports Single Location not showing in Taxonomy archive

This topic contains 8 replies, has 2 voices, and was last updated by  Eyal Fitoussi 4 years ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #48826

    Keith McGregor
    Participant

    Hi,

    I have a taxonomy (care type) set up for a custom post type (nursing homes) and I am trying to show the single location data within the taxonomy archive, but nothing is showing.

    For the single post type pages I have been using the following which works fine:

    <?php echo do_shortcode('[gmw_single_location elements="map,address,directions_link" map_width="100%" ]'); ?>

    But it doesn’t on the archive. The archive main loop looks like this at present:

    Can anyone explain why this isn’t working please?

    #48845

    Eyal Fitoussi
    Keymaster

    Hello Keith,
    try passing the post ID to the shortcode using the item_id attribute.

    Something like:

    Let me know if that helps.

    #48855

    Keith McGregor
    Participant

    Works a charm. Thank you for your help and for the plugin in general.

    #48856

    Eyal Fitoussi
    Keymaster

    You are very welcome. I am glad I could help.

    #48857

    Keith McGregor
    Participant

    One other question though:

    The documentation doesn’t seem to explain how I can limit what elements I wish to show, but also display the additional info box. If I use this code in order to remove the title etc. the info box doesn’t show:

    <?php echo do_shortcode( '[gmw_single_location elements="map,address,directions_link" additional_info="phone,fax,email,website" item_type="post" item_id="'.$post->ID.'"]' ); ?>

    Am I missing something here?

    #48858

    Eyal Fitoussi
    Keymaster

    What missing in the documentation ( which I just realized while answering another user for the same questions ) is the additional_info argument as part of the elements attribute.

    You need to add the additional_info as part of the “elements” attribute in the order you would like it to display it.

    for example:
    < ?php echo do_shortcode( '[gmw_single_location elements="map,address,directions_link,additional_info" additional_info="phone,fax,email,website" item_type="post" item_id="'.$post->ID.'"]' ); ?>

    #48859

    Keith McGregor
    Participant

    Actually I’ve figured it out. I just needed to add additional_info to the elements list. It might be worth you adding that to the relevant page on the documentation for future users.

    Thanks again.

    #48860

    Keith McGregor
    Participant

    Haha jinx!

    #48861

    Eyal Fitoussi
    Keymaster

    I was faster 😉

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

The topic ‘Single Location not showing in Taxonomy archive’ is closed to new replies.