Info tab not showing on free listings
This topic contains 13 replies, has 5 voices, and was last updated by vicki 8 years, 2 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
January 20, 2017 at 8:04 pm #346474
I have a free listing level that doesn’t allow an image or description, just address and phone. The detail page is showing Map and Review tabs but not an info tab with the address and phone.
Here’s an example URL
The address shows properly on all other listing packages.
I do have some code in functions.php to move data from sidebar (see below) but I don’t see that that would affect the info tab on this one package
//* Code below removes listing info from right sidebar on Detail Page and puts in in Profile-Desc tab // add details in content area add_action('geodir_before_description_on_listing_detail','geodir_detail_page_more_info',10); // remove details from sidebar function my_change_sidebar_content_order() { return array( 'geodir_social_sharing_buttons', 'geodir_share_this_button', 'geodir_edit_post_link', 'geodir_detail_page_review_rating', 'geodir_detail_page_google_analytics' ); } add_filter('geodir_detail_page_sidebar_content', 'my_change_sidebar_content_order'); //* Change formatting of address on listing detail page add_filter('geodir_show_post_address', 'geodir_change_address_order' , 100 , 2) ; function geodir_change_address_order($html , $vars) { global $post, $preview, $wpdb; $field_icon=''; if (strpos($field_icon,'http') !== false) {$field_icon_af = '';} elseif($field_icon==''){$field_icon_af = '<i class="fa fa-home"></i>';} else{$field_icon_af = $field_icon; $field_icon='';} { $html = '<p class="" style="clear:both;" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">'; $html .= '<span class="geodir-i-location" style="'.$field_icon.'">'.$field_icon_af; $html .= ' '; $html .= '</span>'; //print_r($_POST); if($post->post_address){ $html .= 'Address:<span itemprop="streetAddress">'.$post->post_address.'</span><br>';} if($post->post_city){ $html .= '<span itemprop="addressLocality">'.$post->post_city.',</span> ';} if($post->post_region){ $html .= '<span itemprop="addressRegion">'.$post->post_region.'</span> ';} if($post->post_zip){ $html .= '<span itemprop="postalCode">'.$post->post_zip.'</span><br>';} if($post->post_country){ $html .= '<span itemprop="addressCountry">'.$post->post_country.'</span><br>';} $html .= '</p>'; } return $html ; }
January 20, 2017 at 11:50 pm #346629Have you tried disabling that code to see if the info comes back?
January 20, 2017 at 11:52 pm #346630Please also provide admin credentials in case that doesn’t work…
Thanks
January 21, 2017 at 3:47 pm #346831I did, and of course if I remove the code moving info from the sidebar it DOES appear in the sidebar, but that’s not really the issue. The issue is that the address appears in the Info/Profile tab for all other packages except “Bare Bones” id=1. I couldn’t find any field setting for that package that would hide the address information. I looked at the code in functions.php, which I took from here:
https://wpgeodirectory.com/support/topic/detail-listing-info-inside-profile-tab/
and there doesn’t seem to be anything there that would affect package type, so I’m stumped. I’ll send admin details in a private msg if you need to log in.
January 21, 2017 at 4:07 pm #346865This reply has been marked as private.January 21, 2017 at 7:23 pm #347021I asked to the developers to have a look. They’ll let you know after the week end.
Thanks
January 21, 2017 at 8:28 pm #347034Thank you!
January 23, 2017 at 11:00 am #347789Hi Vicki,
Info/Profile tab will be visible only when you have some description.
Please fill some text, empty your wpengine cache and then try.
January 23, 2017 at 4:38 pm #347980OK. I didn’t see that anywhere in the documentation. That leads to a couple more questions.
1. If I limit the description for a package to, say, 100 characters, but the description field contains 250 char of text, is there any way to add an ellipsis or some indication that the text isn’t complete? This is especially helpful if a listing downgrades on expiration. Text cut off mid sentence looks weird.
2. From my testing it looks like if I set a description limit greater than 0, the address will display in the profile tab even if the description field is empty. Is that the expected behavior?
I need to rethink the free package and this new information will help me figure out which way to go. My thinking was that disallowing a description on free listings would avoid instances where someone typed in their URL rather than upgrade to have a link in a paid package.
I’ve added code to prevent html tags in the description, but that doesn’t stop people from typing the URL. But I *did* want the address and phone to display.
January 23, 2017 at 4:47 pm #347982OK. I didn’t see that anywhere in the documentation. That leads to a couple more questions.
Don’t you think thats obvious? If the tab content is empty, it doesn’t make sense to show the tab.
In your case, you have customised your site’s profile tab. You are using a hook to add your custom fields above the profile tab content.
1. If I limit the description for a package to, say, 100 characters, but the description field contains 250 char of text, is there any way to add an ellipsis or some indication that the text isn’t complete? This is especially helpful if a listing downgrades on expiration. Text cut off mid sentence looks weird.
I think that might be possible with css.
2. From my testing it looks like if I set a description limit greater than 0, the address will display in the profile tab even if the description field is empty. Is that the expected behavior?
We check for empty string, before displaying profile tab. Even if you place a dot in description that tab will get displayed. So yes its expected behaviour.
Edit: @paolo, can you answer his second point? I think I misunderstood his 2nd point.
Thanks
January 23, 2017 at 9:46 pm #348145I’m not 100% sure, but I believe the profile tab is only hidden if the description limit is 0.
If the limit isn’t 0 it will be displayed even if it’s empty, but that’s not possible if added from the front end because it’s a mandatory field, so only the admin could create a empty listing from the back end.
I asked to Stiofan to let us know if this is correct or not.
Thanks
January 23, 2017 at 9:52 pm #348147Thanks, I’ve been looking into this more. It does seem that changing the description limit made the tab display even if it’s empty. Good reminder about that only being available from the back end.
I looked into the CSS but there aren’t any solutions that would apply to the description on just one package type, so I’ll look for other ways to handle this now that I understand better how it works.
January 24, 2017 at 11:56 am #348472If you set the description limit to “0” then the description input field on freontend and tab will be hidden/removed, this feature was added by request of many users who wanted to sell a description as a upgrade.
Stiofan
January 24, 2017 at 7:48 pm #348706Yes, Stiofan, I understand now. What was throwing me off is that I had added code to make the info details display in the profile tab rather than the sidebar and forgot that was not default behavior. I, too, wanted to set the description limit to 0 for free listings as an incentive to upgrade. So I may go back to info details in the sidebar, although I think more people see them in the tabs due to “banner blindness”.
In any case, thanks for the clarification and please tell Kiran “I love u too” for the title code here
since I’ll use that if I keep the details in the sidebar.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket