TLN

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 39 total)
  • Author
    Posts
  • in reply to: Hooking into new listing saved #485769

    TLN
    Expired Member
    Post count: 131

    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 );
    in reply to: Displaying Favorite Listings #482709

    TLN
    Expired Member
    Post count: 131

    Thanks Kiran.

    I’ve implemented the fix, and it is working perfectly. I appreciate your help!

    in reply to: Custom Fields Sorting Bugs #482073

    TLN
    Expired Member
    Post count: 131

    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

    in reply to: Displaying Favorite Listings #482028

    TLN
    Expired Member
    Post count: 131

    Is there an update on this? Can we use the gd_listings shortcode to display a user’s favorite listings?


    TLN
    Expired Member
    Post count: 131

    Yep. 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.


    TLN
    Expired Member
    Post count: 131

    That sounds good. Thanks Kor.

    in reply to: New template issues #478032

    TLN
    Expired Member
    Post count: 131

    Thanks Paolo. I figured as much, but wasn’t sure. I appreciate your response.

    in reply to: New template issues #477970

    TLN
    Expired Member
    Post count: 131

    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).

    in reply to: New template issues #477713

    TLN
    Expired Member
    Post count: 131

    GeoDirectory 2.0.0.53
    Directory Starter 2.0.0.5
    Supreme Directory 2.0.0.6


    TLN
    Expired Member
    Post count: 131

    I 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!


    TLN
    Expired Member
    Post count: 131

    Thanks 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.

    in reply to: Displaying Favorite Listings #475581

    TLN
    Expired Member
    Post count: 131

    Thanks Alex. Much appreciated.

    in reply to: Shortcode for favorites #475455

    TLN
    Expired Member
    Post count: 131

    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.

    in reply to: Displaying Favorite Listings #475451

    TLN
    Expired Member
    Post count: 131

    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.


    TLN
    Expired Member
    Post count: 131

    That makes sense. Thanks Alex. I appreciate the tip.

Viewing 15 posts - 16 through 30 (of 39 total)