Differing Claim Listing Forms

This topic contains 10 replies, has 4 voices, and was last updated by  identity 4 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #520716

    identity
    Lifetime Member
    Post count: 445

    I just noticed that I’m seeing two different “Claim” forms.

    I have a Ninja Form Claim Listing widget in the sidebar which lets me assign it to the specific claim form that I’ve created.

    There is also a “Claim Me” button which appears in the header section of the SD template, which pulls up a basic form for claiming. How do I set that “Claim Me” button to use the specific NF claim form that I’ve created?

    Cheers

    #520723

    Alex Rollin
    Moderator
    Post count: 27815

    That uses the GD Post Claim widget. You can use the same filter examples to customize that: https://wpgeodirectory.com/docs-v2/themes/supreme/#customize-single

    #520733

    identity
    Lifetime Member
    Post count: 445

    Alex,

    Thanks. Unfortunately, this is probably way beyond my understanding. The “Claim Me” code here is, I think, far more complicated, rolling in the author image, if/then/else tests based on whether it is in fact claimed already.

    That aside though, just testing out the general notion, I swapped out in the header-single-top.php file the following:
    Original

    if ( ! $author_link && function_exists( 'geodir_claim_show_claim_link' ) && geodir_claim_show_claim_link( $gd_post->ID ) ) {
    		$author_name  = __( 'Claim Me', 'supreme-directory' );
    		$author_link  = do_shortcode( '[gd_claim_post text="Claim Me" output="button"]' );
    		$author_image = '';
    

    With this:

    if ( ! $author_link && function_exists( 'geodir_claim_show_claim_link' ) && geodir_claim_show_claim_link( $gd_post->ID ) ) {
    	        $author_name  = __( 'Claim Me', 'supreme-directory' );
    		$author_link  = do_shortcode( '[ninja_form id=4 text="Claim Me" output="button"]' );
    		$author_image = '';
    

    In general, this did work, but rather than a button, it displayed the entire form, so I can only assume that the original function actually accounts for the button and the form overlay itself.

    Other thoughts?

    Cheers

    #520734

    identity
    Lifetime Member
    Post count: 445

    Update…

    Have since tried this code:

    $author_link  = do_shortcode( '[gd_ninja_forms id="4" text="Claim Me" output="button"]' );

    Which does appear to mimic the same “lightbox” opening used on NFs, but it just results in an empty black box overlay on the screen now without the form ever loading.

    With the ability to now customize the form through NF, it seems like there needs to be a backend setting to assign forms to any “template” functions like this.

    Cheers

    #520881

    Alex Rollin
    Moderator
    Post count: 27815

    I would recommend you switch away from the GeoDirectory Single. Then you can use shortcodes with HTML and CSS to create the detail info area the way you want.

    #521017

    Naveen Giri
    Moderator
    Post count: 1559

    Hi identity,

    you can also use filter to change the form

    
    
    
    add_filter('sd_detail_author_link', 'sd_detail_author_link_callback', 10, 2);
    function sd_detail_author_link_callback( $author_link, $author_id ){
    	$author_link = do_shortcode( '[gd_ninja_forms form_id="1" text="Claim Me" output="button"]' );
    	return $author_link; 
    }
    

    can you please share the page link where you have this issue.

    Thanks

    #521032

    identity
    Lifetime Member
    Post count: 445
    This reply has been marked as private.
    #521688

    Kiran
    Moderator
    Post count: 7069

    What is the site login url?

    #521725

    identity
    Lifetime Member
    Post count: 445
    This reply has been marked as private.
    #521909

    Kiran
    Moderator
    Post count: 7069

    Hello There,

    Issue has been fixed. In gd_ninja_forms shortcode correct parameter is “form_id” instead of “id”. Please check and let us know.

    Regards,
    Kiran

    #521956

    identity
    Lifetime Member
    Post count: 445

    Excellent, looks good!

    Cheers

Viewing 11 posts - 1 through 11 (of 11 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket