TLN
Forum Replies Created
-
AuthorPosts
-
Please see below for my solution so far. Perhaps it will help somebody out.
// executes when a listing is saved function on_save_listing( $post_id, $post, $update ) { // get the author id $author_id=$post->post_author; $updated = ($update) ? "updated" : "saved"; if ($updated=='saved') { // do what you need to do here // this will run when a gd_place post is saved } } add_action( 'save_post_gd_place', 'on_save_listing', 10, 3 );
I ended up compensating since I don’t know when the listing is saved for the first time. Instead, i am using the following hook to do some more stuff when the listing is published (which should only happen once in theory).
function on_publish_listing( $post_id, $post ) { //get author id $author_id=$post->post_author; //do some stuff here.. } add_action( 'publish_gd_place', 'on_publish_listing', 10, 2 );
Thanks Kiran.
I’ve implemented the fix, and it is working perfectly. I appreciate your help!
I was able to fix this by editing the geodir_custom_fields table and changing the value in the tab_parent column to a different fieldset id. Now my Categories field is showing in the backend again, and in the frontend where it’s supposed to. Needless to say, the sorting functionality is very glitchy.
GeoDirectory v2.0.0.55
Is there an update on this? Can we use the gd_listings shortcode to display a user’s favorite listings?
April 21, 2019 at 10:26 pm in reply to: Cannot change default listing type using [gd_add_listing] shortcode #482027Yep. This is still an issue. I ended up using a plugin to redirect the page to the right listing form using the listing_type URL variable.
April 4, 2019 at 5:37 am in reply to: What is the best practice for customizing a child theme? #478115That sounds good. Thanks Kor.
Thanks Paolo. I figured as much, but wasn’t sure. I appreciate your response.
Thanks Alex. I was able to change some things per your instructions. However, there does not seem to be a way to access this part of the page (the top section).
Please kindly see my screenshot (attached).
GeoDirectory 2.0.0.53
Directory Starter 2.0.0.5
Supreme Directory 2.0.0.6March 21, 2019 at 7:48 pm in reply to: Cannot change default listing type using [gd_add_listing] shortcode #475776I will wait for a fix. There are other bugs I’m hoping will be resolved soon which have been reported to you as well. Thank you!
March 20, 2019 at 7:16 pm in reply to: Cannot change default listing type using [gd_add_listing] shortcode #475585Thanks guys. I have it as a separate page, and it still doesn’t work. I tried Kor’s code but it still defaults to gd_place (not gd_special). It ignores the argument.
Thanks.
Thanks Alex. Much appreciated.
Having the same issue. “show_favorites_only” does not seem to work on GeoDirectory V2. I’ve been hitting my head for hours on this.
Also, is it possible to show the current user’s own listings using the GD Listings widget or shortcode?
I tried this code:
[gd_listings post_type=”gd_place” post_author=”3″]However, it looks like the post_author param needs to be manually set. Is it possible to make this the current user instead (without having to manually enter their ID?)
I realize that you can do this all with PHP by modifying a template, but I was hoping to avoid that route.
Thanks for all the help.
March 16, 2019 at 12:26 am in reply to: Changing "You must login to post." to automatically redirect #474832That makes sense. Thanks Alex. I appreciate the tip.
-
AuthorPosts