GeoDirectory SupportIf statements and the business owner and associate property. – GeoDirectory Support https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/feed Sun, 15 Feb 2026 17:59:19 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-39587 <![CDATA[If statements and the business owner and associate property.]]> https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-39587 Fri, 15 May 2015 12:36:18 +0000 urbanfix Is it possible to write an if statement based on whether the author is the owner?
e.g,
If the author of the detail page is the owner and asso= yes
Add tab to detail page
If owner and asso= no
dont add tab…
Thanks,
urbanfix

]]>
https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-39591 <![CDATA[Reply To: If statements and the business owner and associate property.]]> https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-39591 Fri, 15 May 2015 15:15:54 +0000 Simone Hello, that’s doable if you have some knowledge in PHP (and in wordpress) of course, you can create a function and re-set the tab array (with/without your tab) only if the author==owner. I know Im stating the obvious, this is a custom modification.
Here it is explained how to reset a new tab array
https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-31820

you can create an IF statement for your desired/undesired tab using the claimed table in the wp_geodir_gd_place_detail table (1 or 0)

]]>
https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-39640 <![CDATA[Reply To: If statements and the business owner and associate property.]]> https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-39640 Fri, 15 May 2015 19:05:03 +0000 Paolo I haven’t tested, but this should do the job:

global $post,$current_user;
get_currentuserinfo();
$is_owned = geodir_get_post_meta($post_id,’claimed’,true);
if ($post->post_author == $current_user->ID && $is_owned != ‘0’) { // your function to reorder tabs here }

Let us know how you went.

Thanks

]]>
https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-39708 <![CDATA[Reply To: If statements and the business owner and associate property.]]> https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-39708 Sat, 16 May 2015 18:29:06 +0000 urbanfix Hey guys, sorry for taking so long to get back to you,
I shall try them both out and let you know how it goes!
Thanks

]]>
https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-43800 <![CDATA[Reply To: If statements and the business owner and associate property.]]> https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-43800 Fri, 26 Jun 2015 22:24:51 +0000 urbanfix Hi guys,
I couldn’t get this to work and it wouldn’t be fit for purpose anymore!

However, would it be possible to add the tab based on the price plan?
Thankyou,

]]>
https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-43841 <![CDATA[Reply To: If statements and the business owner and associate property.]]> https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-43841 Sat, 27 Jun 2015 15:34:34 +0000 Paolo Try this:

if ($post->package_id == 1 ) {// your function to reorder tabs here }

if this doesn’t work, try:



$post_package_id = geodir_get_post_meta($post_id, 'package_id');
if ($post_package_id == 1 ) {// your function to reorder tabs here }

Obviously make sure to change the price ID from 1 to whatever you need.

Thanks

]]>
https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-58165 <![CDATA[Reply To: If statements and the business owner and associate property.]]> https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-58165 Tue, 27 Oct 2015 16:28:47 +0000 urbanfix This was a successfully implemented!
Please mark as resolved,
Thanks UF

]]>
https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-58189 <![CDATA[Reply To: If statements and the business owner and associate property.]]> https://wpgeodirectory.com/support/topic/if-statements-and-the-business-owner-and-associate-property/#post-58189 Tue, 27 Oct 2015 18:54:55 +0000 Paolo You are welcome 🙂

]]>