Support » Plugins » Hacks » PrettyPhoto opening googlemaps breaks site

  • 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.

    Enfold wordpress theme.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz


    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.

    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.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PrettyPhoto opening googlemaps breaks site’ is closed to new replies.