Forum Replies Created

Viewing 14 replies - 16 through 29 (of 29 total)
  • Thread Starter hmgh

    (@hmgh)

    Can ANYONE in these forums help? Please?

    Thread Starter hmgh

    (@hmgh)

    Eyal, any suggestions on the code above? I tried using ninja_forms_field id=165, [ninja_forms_field id=165], changing the zipcode and $zipcode back to address and $address, but still no luck? Can anyone help?

    Thread Starter hmgh

    (@hmgh)

    Well, I tried it, but no luck. I’m a total newbie when it comes to coding. The form field in NinjaForms for the zipcode is [ninja_forms_field id=165]. I am using a WordPress theme called Evolve, and I modified the functions.php file to this:

    <?php
    
    $evolve_themename = "evolve";
    
    if ( get_stylesheet_directory() == get_template_directory() ) {
    	define('EVOLVE_URL', get_template_directory() . '/library/functions/');
    	define('EVOLVE_DIRECTORY', get_template_directory_uri() . '/library/functions/');
    } else {
    	define('EVOLVE_URL', get_template_directory() . '/library/functions/');
    	define('EVOLVE_DIRECTORY', get_template_directory_uri() . '/library/functions/');
    }
    
    get_template_part( 'library/functions/options-framework' );
    get_template_part( 'library/functions/basic-functions' );
    get_template_part( 'library/functions/options' );
    
    function gmw_update_location_via_wpuf(  $post_id ) {
    
    	//make sure we have post ID
    	if ( !$post_id )
    		return;
    
    	//change meta_field_name to the custom field of the address field
    	$address = get_post_meta( $post_id, 'ninja_forms_field id=165', true );
    
    	//include geocoder file
    	include_once( GMW_PT_PATH .'/includes/gmw-pt-update-location.php' );
    
    	if ( function_exists( 'gmw_pt_update_location' ) ) {
    		//setup geocoder args
    		$args = array(
    				'post_id'         => $post_id,
    				'post_type'       => get_post_type( $post_id ), // change post_type to your own
    				'post_title'      => get_the_title( $post_id ),
    				'zipcode'         => $zipcode
    		);
    		//run geocoder function
    		gmw_pt_update_location( $args );
    	}
    }
    //update data of new post
    add_action('wpuf_add_post_after_insert', 'gmw_update_location_via_wpuf', 10, 1 );
    //update data when post updated
    add_action('wpuf_add_post_after_updated', 'gmw_update_location_via_wpuf', 10, 1 );
    
    ?>

    Perhaps you can spot something I did wrong?

    Thread Starter hmgh

    (@hmgh)

    Thank you Eyal. The tutorial is for using an address field. Would it work the same for using a zip code, and if so, would I just replace the word ‘address’ in the code with ‘zip’ or ‘zipcode’?

    Thread Starter hmgh

    (@hmgh)

    Yessir.

    Thread Starter hmgh

    (@hmgh)

    I’m afraid you are probably correct, Jeff. In reviewing the site, it looks like it started on Tuesday evening, Aug. 5th, for no reason whatsoever. My WordPress update didn’t happen until the following day. Also, Jetpack just updated a few minutes ago and the probably still persists. Waiting on the magic to happen! :-/

    Thread Starter hmgh

    (@hmgh)

    Will do. Thanks!

    Thread Starter hmgh

    (@hmgh)

    Thread Starter hmgh

    (@hmgh)

    Worked perfect! Thanks Jeremy!

    Mmm hmm. And neither did your “fix” work. At least this one worked for me. If only I had seen it before going to the trouble of disabling all plugins, manually re-installing 3.5, etc. Would have saved me a lot of time and trouble. If me re-posting this “fix” helps someone else out and keeps them from jumping through unnecessary hoops, then so be it.

    But thank you for your kind concern.

    Disabling plugins, re-installing WordPress 3.5, changing themes, none of it works.

    This worked for me.

    Per Member JoseVega:

    Hi, I had the same issue, and I solved it adding: define(‘CONCATENATE_SCRIPTS’, false ); in my wp-config.php file just before require_once(ABSPATH . ‘wp-settings.php’);

    I hope it works for you.

    Thread Starter hmgh

    (@hmgh)

    JoseVega posted this solution, and it worked for me.

    Hi, I had the same issue, and I solved it adding: define(‘CONCATENATE_SCRIPTS’, false ); in my wp-config.php file just before require_once(ABSPATH . ‘wp-settings.php’);

    I hope it works for you.

    Thread Starter hmgh

    (@hmgh)

    Yes, I’ve tried everything in this article, to no avail. Thank you, though.

    Thread Starter hmgh

    (@hmgh)

    P.S. The current Submission form on the site is using formmail, so I have to get all of the info and photos and write the html code for every new post. Thus the need for something more user-friendly.

Viewing 14 replies - 16 through 29 (of 29 total)