EH
Forum Replies Created
-
AuthorPosts
-
That is what I ended up ultimately doing. Thanks
@jeff Thank you. I think I have it working. Posting my hopefully working code incase anyone else can use it.
//Add Message for Directory users Subscribers Only add_action ('genesis_before_header', 'geo_badge'); function geo_badge(){ if ( is_user_logged_in() && current_user_can( 'subscriber' )) { global $current_user; get_currentuserinfo(); //get all listing from author $args = array( 'post_type' => 'gd_place', 'author'=> $current_user->ID ); $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); $postid = get_the_ID (); global $wpdb; $ispaid[] = $wpdb->get_var("SELECT package_id FROM wp_geodir_gd_place_detail WHERE post_id = $postid"); $expire = $wpdb->get_var("SELECT expire_date FROM wp_geodir_gd_place_detail WHERE post_id = $postid"); endwhile; wp_reset_query(); endif; foreach ($ispaid as $pack_id): if ($pack_id == 2) { echo '<div class="statusbar"><div class="statusbar-wrapper"><div class="site-inner">You are on premium package. Your package will expire on '; echo $expire; echo '</div></div></div>'; break; } endforeach; if ($pack_id != 2 ){ echo '<div class="statusbar"><div class="statusbar-wrapper"><div class="site-inner">You are on a free package. You can upgrade <a href="/upgrade-listing-premium">here.</a>'; echo '</div></div></div>'; } } }
June 27, 2016 at 8:28 pm in reply to: language file not working correctly after latest update #217056Installing the CPT fixed my problem. Thank you.
June 23, 2016 at 7:58 pm in reply to: language file not working correctly after latest update #214835I’m sorry to be a pain. But I have translated place and it works everywhere expect for the backend menu Place Title or Place Description am I missing something?
I can install the custom post type add on but i’m not using a custom post type, I just want place to be called listing.
June 23, 2016 at 7:44 pm in reply to: language file not working correctly after latest update #214830Correct me if I’m wrong, but it looks as though I can’t change the name of places on the back end or Place Title or Place Description because it pulls it from the CPT?
June 23, 2016 at 6:33 pm in reply to: language file not working correctly after latest update #214775Where do I get the New PO file? I copied it from /wp-content/plugins/geodirectory/geodirectory-languages/geodirectory-en_US.po but it didn’t seem to fix it.
June 23, 2016 at 6:00 pm in reply to: language file not working correctly after latest update #214764if I update my PO file will I have to do my translation over again? is there somewhere where I can grab the latest PO file? I’m working on a local and push stuff up to live via GIT.
June 23, 2016 at 5:54 pm in reply to: language file not working correctly after latest update #214758This reply has been marked as private.I found my answer here. https://wpgeodirectory.com/support/topic/sort-not-working/#post-112947 looks like it’s not possible to force featured listings first in a search by distance.
I figured it out. Thank you!
Actually spoke too soon, no I didn’t.
June 23, 2016 at 1:57 pm in reply to: language file not working correctly after latest update #214614This reply has been marked as private.June 23, 2016 at 1:53 pm in reply to: language file not working correctly after latest update #214611This reply has been marked as private.I fixed it. The advanced-cache.php was corrupt.
This reply has been marked as private.It just occurred to me that I could do this with CSS. Nevermind. Thank you.
-
AuthorPosts