Woo Theme (Delegate), Slider Broken, Pound Sign ( # ), Fixed

One of my clients has been using a theme by Woo called Delegate for a few years.  We recently encountered an issue where the home page slider stopped working, resulting in its contents just being empty and the navigation buttons only resulting in a # added to the end of the URL.

Here’s what I learned.

  1. in the theme’s folder, in /includes/theme-actions.php,  ~line 84, there is a section of code that starts with an html comment <!– Slider Setup –>… This is followed by a script that is set with PHP to only load if the current page “is_home” like this<script type=”text/javascript”>
    <?php if ( is_home() ) { ?> …Now, despite what this sounds like it means, is_home actually refers to your main posts page, so if you have a static front page in Settings>>Reading, this will return false.  Alter this conditional tag as follows to make the slider setup script run on your non-posts-page homepage.<script type=”text/javascript”>
    <?php if ( is_home() || is_front_page() ) { ?> …the “||” basically means “or” so now the conditional tag reads ‘if is main posts page or static front page’
  2. in the theme’s folder, in /includes/theme-js.php,  ~line 4, there is another instance of the conditional tag “is_home” that loads two Javascript files into the <head> of the html… This also needs to be changed if you’re using a static front page.if ( is_home() || is_front_page() ) {
    wp_enqueue_script( ‘jqueryEasing’, get_template_directory_uri() . ‘/includes/js/jquery.easing.min.js’, array( ‘jquery’ ) );
    wp_enqueue_script( ‘slides’, get_template_directory_uri() . ‘/includes/js/slides.min.jquery.js’, array( ‘jquery’ ) );
  3. Since we were using a custom page template that didn’t come with the theme (essentially a copy of index.php, but some modifications), we also needed to update the page template file, copying the new version of the slider’s activation from the new version of index.php<!– Featured Slider –>
    <?php if ( get_option( ‘woo_slider_disable’ ) != ‘true’ ) { get_template_part( ‘includes/slider’ ); } ?>
    <!– Featured Slider end –>

That’s basically it.  Keep in mind that updating the Woo Framework will likely overwrite these alterations, so back them up!!

 

If you found this information helpful, please consider making a donation. No amount is too small.
paypal.me/andrewapeterson





Bitcoin Donation Address:
1KAAN2ULpdZ2cjegDHYTXP1qXGLUybs5H6

5 Replies to “Woo Theme (Delegate), Slider Broken, Pound Sign ( # ), Fixed”

  1. I am seeing a similar issue with the “estate” wooTheme and unfortunately I am unable to get into their support area. The featured property slider is no longer working and I looked at the files you suggest here but am not seeing the calls. Could you take a look and offer any suggestions? I would GREATLY appreciate it. The error started when I updated the WordPress version and updated the WooFramework to 1.3.13.

  2. I took a look.
    Unlike the situation I had, your site doesn’t appear to be missing any scripts. However, the version of jQuery on your site is 1.8.3 and on the Woo Estate Demo, it’s 1.7.2… All the scripts in question seem to be newer on your site too… Yours are version 3.5 and theirs are 3.4.2…

    That said, the inline styling on the HTML elements that the Javascript is supposed to write, is getting written, so I don’t really think that’s the issue.

    HMMM…
    Also, your Contact Form 7 Plugin is loading an older version of jQuery than Woo is loading.

    My first suggestion is to turn off all your plugins and see if the Slider comes back. Or first, if you haven’t already, make sure all your plugins are up to date.

  3. I have a similar problem & have looked for the script/s suggested but could not locate it. All plugin are up to date but I disabled them too just in case.

    Still the same problem. Anyone have any suggestions?

    Thanks

  4. I occasionally have the same issue (the slider not loading the contents)
    I have found that this is usually the issue within Firefox and not with
    Chrome. Chrome always loads the slider fine.

Leave a Reply

Your email address will not be published. Required fields are marked *