WordPress.org

Ready to get started?Download WordPress

Forums

Adding a clickable CSS Jquery Map (1 post)

  1. bobbycox
    Member
    Posted 1 year ago #

    Hello Everyone!
    I have a self hosted site running wordpress.org and I recently bought a clickable map of Spain to implement on my site. I rather foolishly bought the map thinking it was a simple plugin but it's in fact a zip that needs uploading to my server. I wasn't very sure how to do it so I contacted the producer....this was his response...

    Hi,
    You can add the map as any other script and style sheet to WordPress in the functions.php, as shown there:
    http://weblogtoolscollection.com/archives/2010/05/06/adding-scripts-properly-to-wordpress-part-1-wp_enqueue_script/

    This code should be pasted into the functions.php file of your theme.

    function map_script() {
    wp_enqueue_script(
    'cssmap-script',
    dirname( get_bloginfo('stylesheet_url') ). '/js/jquery.cssmap.js', // here is a path to the .js file;
    array('jquery')
    );
    }
    add_action('wp_enqueue_scripts', 'map_script');

    On your server upload just the 'cssmap-spain' folder found in the package (the one with the CSS file and images) and link to the cssmap-spain.css file. You can also unload the jquery.cssmap.js file onto your server for better performance. For the most recent version please download it from there: http://cssmapsplugin.com/4/jquery.cssmap.js

    Than just put the list of regions into the post or page content (where you want to display a map)

    now, although im very grateful that this man has tried to help me, I'm still a tad confused...I'm no expert with this stuff but I'm not a total muppet either so could some kind soul try to put this into a step by step guide for me? the link he sent is utter gobbledygook to me...so here are my questions:

    a) how do i add a script and stylesheet to functions.php?
    b)can i paste the code at the bottom of the functions.php file of the theme?
    c)He says upload the map to the server...any particular place on the server?
    d) he says link it to the css map file....how do i link it?
    e)again he says unload the jquery onto the server....anywhere in particular?

    Goodness me. Thank you to anyone in advance who is willing to explain this to me.

    kind regards,
    Bobby

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags