WordPress.org

Ready to get started?Download WordPress

Forums

PrettyPhoto opening googlemaps breaks site (3 posts)

  1. cam80
    Member
    Posted 6 months ago #

    Hi.
    I am having trouble getting it to work on my wordpress site.Currently it breaks the site. It has prettyphoto built in as far as i know and understand. I'm learning and my css and html skills are improving but i can't get this figured out.
    Any help would be much appreciated.
    I am tring to put this code in a html widget in the footer. http://pastebin.com/xE17F5t4

    Enfold wordpress theme.
    Thx

  2. bcworkz
    Member
    Posted 6 months ago #

    Don't worry about the widget aspect for now, it adds needless complications and your procedural code can be easily widgetized later. Making your code into a widget is much easier when you know your code basically works.

    All referenced CSS pages and JS libraries cannot be directly linked on your template. They need to be enqueued using wp_enqueue_script() and wp_enqueue_style(). Enqueuing script with the 5th parameter set to true causes it to be loaded in the footer. You should even place as much JS code as possible on an external code page and enqueue that as well, specifying any dependencies so everything gets loaded in the right order. Your footer template code should just have a minimal amount of function calls.

    Because you are altering your footer template code, you should create a child theme to protect your alterations. All the enqueue calls will go on your child's functions.php.

    If everything is done correctly, you should get functional footer output. In theory at least. Seems like something or things is always preventing immediate success. Once you get proper output, you can look at widgetizing it. It's probably best to start with an existing default widget that's roughly similar to what you need. Copy and modify the code as needed for the desired output.

  3. cam80
    Member
    Posted 6 months ago #

    Thank you for your reply.
    I understand what you are saying but that is pushing my limited skills to the max.:)
    I was trying to use this plugin which does everything i need but my theme is blocking the lightbox from opening up.
    I am using the enfold theme with a child theme.
    http://wordpress.org/plugins/google-map-lightbox-popup/

    Thx

Reply

You must log in to post.

About this Topic