Differing Claim Listing Forms
This topic contains 10 replies, has 4 voices, and was last updated by  identity 5 years, 10 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: claim form, Ninja forms, supreme directory
- 
		AuthorPosts
- 
		
			
				
December 9, 2019 at 9:24 pm #520716I 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 December 9, 2019 at 9:42 pm #520723That 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 December 9, 2019 at 11:51 pm #520733Alex, 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: 
 Originalif ( ! $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 December 10, 2019 at 12:06 am #520734Update… 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 December 11, 2019 at 12:09 am #520881I 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. December 11, 2019 at 4:24 pm #521017Hi 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 December 11, 2019 at 5:38 pm #521032This reply has been marked as private.December 16, 2019 at 11:57 am #521688What is the site login url? December 16, 2019 at 2:25 pm #521725This reply has been marked as private.December 17, 2019 at 11:43 am #521909Hello 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, 
 KiranDecember 17, 2019 at 3:17 pm #521956Excellent, looks good! Cheers 
- 
		AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket