GeoDirectory SupportShow author on listings that are not claimed – GeoDirectory Support https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/feed Tue, 07 Apr 2026 03:45:13 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-19987 <![CDATA[Show author on listings that are not claimed]]> https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-19987 Wed, 29 Oct 2014 15:55:24 +0000 openmindtrips Hi

Is there a way to show the author of a listing in the sidebar on listings that are not yet claimed?

Thx

]]>
https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-19992 <![CDATA[Reply To: Show author on listings that are not claimed]]> https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-19992 Wed, 29 Oct 2014 16:27:20 +0000 Simone Hi, I’ve just created this function, add it in the functions.php file inside your child theme


 add_action( 'geodir_detail_sidebar_inside', 'geodir_before_detail_page_review_rating_claim',1 );
  function geodir_before_detail_page_review_rating_claim() {
  global $wp_query, $post;
  
  $postid = $wp_query->post->ID;
  
  
 $claimed= geodir_get_post_meta($postid,'claimed',true);
 
  if ($claimed=="1")
  {$myauthor = get_the_author();
  $myauthorlink = get_author_posts_url( get_the_author_meta( 'ID' ) ).'?post_type='.$current_posttype;
  echo '<p>Author: <a href="' .$myauthorlink . '">' . $myauthor . '</a></p>';
  
   }
  else {
     } 
]]>
https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-19995 <![CDATA[Reply To: Show author on listings that are not claimed]]> https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-19995 Wed, 29 Oct 2014 17:04:47 +0000 openmindtrips Thank you for your quick response Simone!

i tried adding it to my child theme’s functions.php but it says that there is an error with the line

function geodir_before_detail_page_review_rating_claim() {
global $wp_query, $post

Do you know what is wrong?

]]>
https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-19996 <![CDATA[Reply To: Show author on listings that are not claimed]]> https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-19996 Wed, 29 Oct 2014 17:06:19 +0000 Simone …not helpful without knowing what’s the error 🙂

]]>
https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-20006 <![CDATA[Reply To: Show author on listings that are not claimed]]> https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-20006 Wed, 29 Oct 2014 18:44:40 +0000 openmindtrips The error is: Parse error: syntax error, unexpected $end in /var/www/openmindtrips.org/public_html/plus/wp-content/themes/geodir_Avada-Child-Theme/functions.php on line 41

(before it said in line 23)

I’ve attached a screen shot of the .php

]]>
https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-20008 <![CDATA[Reply To: Show author on listings that are not claimed]]> https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-20008 Wed, 29 Oct 2014 18:48:18 +0000 Simone Add another } after the last }

]]>
https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-20014 <![CDATA[Reply To: Show author on listings that are not claimed]]> https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-20014 Wed, 29 Oct 2014 19:35:46 +0000 openmindtrips Nice, no error now – so far so good 😀 But when I press a listing it does not show the author of it anywhere in the sidebar…

]]>
https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-20018 <![CDATA[Reply To: Show author on listings that are not claimed]]> https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-20018 Wed, 29 Oct 2014 19:56:39 +0000 Simone ops sorry, in my code just replace this


  if ($claimed=="1")

with


  if ($claimed !="1")
]]>
https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-20031 <![CDATA[Reply To: Show author on listings that are not claimed]]> https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-20031 Wed, 29 Oct 2014 20:49:10 +0000 openmindtrips Still does not show the author even when I corrected it 🙁 Does it have something to do with the GD> listing claims > Show link to author page on listings? is set to yes?

]]>
https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-20032 <![CDATA[Reply To: Show author on listings that are not claimed]]> https://wpgeodirectory.com/support/topic/show-author-on-listings-that-are-not-claimed/#post-20032 Wed, 29 Oct 2014 20:50:11 +0000 Simone if you would give me the login details of wordpress and FTP i will check for you

]]>