geodir_show_listing_info function changed
This topic contains 8 replies, has 4 voices, and was last updated by Stiofan O’Connor 9 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
October 17, 2016 at 2:42 am #285509
Hi Geodirectory team,
1. I was always using geodir_show_listing_info() function to display DETAILS.
2. I use this on my custom template for a very long time to display information from the POST. Address, phone, Website link etc. on my LISTING DETAIL page.3. When I updated to Geodirectory 1.6.1 the function geodir_show_listing_info() function does not display the details anymore 🙁
4. I checked the CODE and the geodir_show_listing_info() function COMPLETELY changed. 🙁5. Can you let me know how to properly display those details?
ADDRESS
PHONE
SEND ENQUIRY| SEND TO FRIEND – LINK
WEBSITE – LINKThanks,
MarcoOctober 17, 2016 at 10:04 am #285699Hi Marco,
Do you mind sharing the URL of the site in question so we can take a look? Also, please share WP temp admin access to your site so we can check the code. You can post the details here using the private reply option below.
Thanks!
October 17, 2016 at 6:37 pm #286072Hi Marco,
there has been indeed some changes in how we handle the custom fields output.
I asked to Stiofan to let us know in detail how to workaround those changes.
Thanks for your patience,
October 18, 2016 at 12:31 am #286279Hi Kor,
I just basically use geodir_show_listing_info()
echo geodir_show_listing_info();That’s it.
The behavior before was it will display the necessary details. But now it does not do anything. I use it in a custom function I made and add it the the details page FILTER/HOOK.
Since this issue was very urgent for us, I needed to make a fix ASAP. I created my own function and used some of the codes on the OLD geodir_show_listing_info() function so I can display the details I need. Mostly it used $post->post_address, $post->geodir_contact, etc. and echo it.
I resolved my issue but with my own function. It will not rely on Geodirectory updates anymore UNLESS you guys will change database, etc.
Hi Paolo,
1. My question now is that in the current version of Geodirectory(1.6.1) can you ever use
echo geodir_show_listing_info();to display details of the POST?
2. What should I expect to happen if I use
echo geodir_show_listing_info();?
Thanks guys. Cheers.
October 18, 2016 at 9:46 am #286457It can now be used to output things from different areas, or even your own defined area, but i guess you want the sidebar output? if so use:
echo geodir_show_listing_info('detail');Thanks,
Stiofan
October 19, 2016 at 5:50 am #287440Hi Stiofan,
I want to use it on the listing detail page template.
Will try using it with the ‘detail’ param.
Thanks,
MarcoOctober 26, 2016 at 8:14 am #291988function geo_insert_info() { echo "<div class='geo-listing-info'>"; global $post, $preview; echo "<h2>"; echo $post->post_title; echo "</h2>"; if(function_exists('geodir_show_listing_info')) { echo geodir_event_show_shedule_date(); } if(function_exists('geodir_show_listing_info')) { echo geodir_show_listing_info('detail'); if($preview) { echo "</div> <!-- close for preview -->"; } } /**/ echo "</div>"; } add_action('geodir_details_main_content', 'geo_insert_info', 45);Hi Stiofan,
It’s still not working… 🙁
Above is my code. I use it on my custom template and hook it on geodir_details_main_content action.
This has always worked with the old code.
Can you advise how can I properly apply this?
Thanks,
MarcoOctober 26, 2016 at 6:35 pm #292347Hi marco,
I alerted Stiofan to look into your code. he’ll let you know asap.
Thanks
October 27, 2016 at 10:22 am #292723Hi Marco,
Your code works for me… Do you have it in your child theme functions?
What theme are u using?
Is everything upto date?Stiofan
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket