Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jpsingleton

    (@jpsingleton)

    It’s not ideal, but I found a workaround that won’t require editing either of the plugins.

    This is how FYN includes the script:

    wp_register_script( 'googlemapapi', "http://maps.google.com/maps/api/js?sensor=false$key", FALSE );
    wp_enqueue_script( 'googlemapapi' );

    And this is how Hubspot includes the script:

    wp_enqueue_script('google-maps', 'http://maps.google.com/maps/api/js?sensor=false');

    In my functions.php file, I essentially removed Hubspot’s script so only the FYN script will be included.

    add_action( 'wp_print_scripts', 'custom_deregister', 100 );
    
    function custom_deregister() {
    	if(!is_admin()) {
    		wp_deregister_script( 'google-maps' );
    	}
    }

    This will break if FYN is ever using a version of the API that is different from the one that Hubspot is wanting, but I don’t know of a better solution right now. (I’m also not using FYN with an API key so that may or may not cause problems as well down the road, or in other situations.)

    Thread Starter jpsingleton

    (@jpsingleton)

    Alright, so a bit of clarification. I actually spun off my own version of the plugin a while back because I needed to be able to format the results differently (with an unordered list + list items). The point at which my code forked was 0.2.2.

    Just recently, it’s been brought to my attention that some users in some browsers will occasionally get an error when they try to click onto the page containing the zip code search form: “Postcode not found!undefined, US” Hence, my looking to revert back to the main code base (or at least spin a version off of 0.2.5).

    I suspect it was the switch to support Google API V3 (in version 0.2.3) that created the conflicts with Hubspot.

    Somehow, between FYN and Hubspot, this script appears in the header twice:

    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&ver=3.5.2"></script>

    Is there a way to make sure the script only gets loaded once?

    Thanks.

    Thread Starter jpsingleton

    (@jpsingleton)

    I modified main.php by changing line 25 from this:

    $set_condition = !is_404();

    To this:

    $set_condition = !headers_sent();

    And everything appears to be working correctly—though I’m not sure if it’s caching cookies when a 404 page is loaded. If it is, it’s not causing me any problems thus far.

    I duplicated/renamed the plugin on my site to make sure the change doesn’t get overwritten by subsequent updates, but if you include this change (or another change that solves the problem), I would love to use the official Smarter Navigation plugin so I can benefit from whatever updates you come out with in the future.

    Thanks.

    Thread Starter jpsingleton

    (@jpsingleton)

    Also, I’m running on WP 3.5.2.

    Thread Starter jpsingleton

    (@jpsingleton)

    For example:

    $nextPostFormat = '%link';
    $nextPostLink = '%thumb<span class="direction">Next <span class="arrow">▶</span></span><span class="next_title">%title</span>';
    
    next_post_link_plus( array(
    	'thumb' 		=> 'medium',
    	'format' 		=> $nextPostFormat,
    	'link'			=> $nextPostLink,
    	)
    );
    Thread Starter jpsingleton

    (@jpsingleton)

    Fantastic. Thanks so much for your help! Emailing you now.

    Thread Starter jpsingleton

    (@jpsingleton)

    Show UI is set as true, I have full permissions, and I’m not using Role Scoper.

    I’m creating the taxonomies using Magic Fields 2… which may be the problem, though I’m not sure why that would be. The taxonomies do appear in the Edit Media screen (as they did before I installed MLA).

    Here is a screenshot of the settings page:
    http://i1314.photobucket.com/albums/t570/jparksingleton/MF2forMLA_zpsaebf65ce.png

    To test outside of MF2, I pasted this code (taken straight from the codex) directly into my functions.php:

    add_action( 'init', 'create_book_tax' );
    
    	function create_book_tax()
    	{
    	   register_taxonomy(
    	      'genre',
    	      'book',
    	      array(
    	         'label' => __( 'Genre' ),
    	         'rewrite' => array( 'slug' => 'genre' ),
    	         'hierarchical' => true
    	      )
    	   );
    	}

    And Genre appears in the taxonomy list in the MLA settings.

    Thanks for your help.

Viewing 7 replies - 1 through 7 (of 7 total)