• Resolved forcewerk

    (@forcewerk)


    Good Day!

    Thanks for the great plugin providing an easy way to replace featured images with a slider!

    However, when I activate the plugin, certain pages are not loading anymore at all.

    I suspect, the plugin is interfering with other jQuery scripts on the same page. Is there any way to make them both work (jQuery accordion in this case). The accordion on this page is actually featuring several separate pages within each element (each gym-class/”Gruppe” shown, is being loaded from an seperate page). Each class has its own featured image – could this also be a problem: Several featured images shown on the same page?

    My WordPress Template is using jQuery UI Core 1.11.4

    If I put the slider on a page with no other jQuery scripts, it’s working perfectly fine! If I deactivate the Super Hero Slider the site is working fine again as well.

    Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Gareth

    (@catapult_themes)

    Hi

    I’ve checked the link you’ve posted but the plugin isn’t installed so it’s not possible for me to check for any errors. Do you have a site where the plugin is installed and the errors are visible?

    Thanks

    Gareth

    Thread Starter forcewerk

    (@forcewerk)

    Hi Gareth, thanks for getting back to me so quickly!

    The plugin is now activated… and the page not loading anymore.
    https://www.bsv-freiburg.de/2018/gruppen/

    Thanks for checking!

    Michael

    Plugin Author Gareth

    (@catapult_themes)

    Okay, do you have access to the php error log?

    Also, what version of PHP is your site running?

    • This reply was modified 6 years, 8 months ago by Gareth.
    Thread Starter forcewerk

    (@forcewerk)

    PHP Version: 7.2
    I’ve activated the PHP Error Log:

    [28-Jun-2018 13:51:34 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/3/username/htdocs/2018/wp-content/themes/gymbase/shortcodes/slider.php on line 8
    [28-Jun-2018 13:51:34 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/3/username/htdocs/2018/wp-content/themes/gymbase/shortcodes/slider.php on line 28
    [28-Jun-2018 13:51:36 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/3/username/htdocs/2018/wp-content/themes/gymbase/shortcodes/slider.php on line 8
    [28-Jun-2018 13:51:36 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/3/username/htdocs/2018/wp-content/themes/gymbase/shortcodes/slider.php on line 28
    [28-Jun-2018 13:58:36 UTC] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /homepages/3/username/htdocs/2018/wp-includes/class-wp-term-query.php on line 288

    That’s the source of slider.php:

    <?php
    //slider
    function theme_slider($atts, $content)
    {
    	global $theme_options;
    	$output = '';
    	$slides_count = count($theme_options["slider_image_url"]);
    	if(count($slides_count))
    	{
    		$output .= '<ul class="slider">';
    		for($i=0; $i<$slides_count; $i++)
    		{
    			$output .= '<li id="slide_' . $i . '" style="background-image: url(' . $theme_options["slider_image_url"][$i] . ');">
    				&nbsp;</li>';
    		}
    		$output .= '</ul>';
    	}
    	return $output;
    }
    add_shortcode("slider", "theme_slider");
    
    //slider content
    function theme_slider_content($atts, $content)
    {
    	global $theme_options;
    	$output = "";
    	$slides_count = count($theme_options["slider_image_url"]);
    	if(count($slides_count))
    	{
    		$output .= '<div class="slider_content_box clearfix">';
    		for($i=0; $i<$slides_count; $i++)
    		{
    			if($theme_options["slider_image_title"][$i]!="" || $theme_options["slider_image_subtitle"][$i]!="")
    			{
    				$output .= '<div id="slide_' . $i . '_content" class="slider_content"' . ($i==0 ? ' style="display: block;"' : '') . '>';
    				if($theme_options["slider_image_title"][$i]!="")
    					$output .= '<h1 class="title">' . ($theme_options["slider_image_title"][$i]) . '</h1>';
    				if($theme_options["slider_image_subtitle"][$i]!="")
    					$output .= ($theme_options["slider_image_title"][$i]!="" ? '<br />' : '') . '<h3 class="subtitle">' . esc_attr($theme_options["slider_image_subtitle"][$i]) . '</h3>';
    				$output .= '</div>';
    			}
    		}
    		$output .= '	<div class="slider_navigation controls">';
    		$j = 0;
    		for($i=0; $i<$slides_count; $i++)
    		{
    			if($theme_options["slider_image_link"][$i]!="")
    				$output .= '<a class="more" href="' . esc_attr($theme_options["slider_image_link"][$i]) . '" id="slide_' . $i . '_url"' . ($i==0 ? ' style="display: block;"' : '') . '>&nbsp;</a>';
    		}
    		$output .= '	<a id="prev" class="prev" href="#">&nbsp;</a><a id="next" class="next" href="#">&nbsp;</a>
    					</div>
    				</div>';
    	}
    	return $output;
    }
    add_shortcode("slider_content", "theme_slider_content");
    ?>
    

    Thank you!

    Thread Starter forcewerk

    (@forcewerk)

    *actually I had to downgrade from PHP Version 7.2 to 7.1 due to issues with the WPBakery Page Builder. The visual editor showed no content in the backend. As soon as I switched to PHP 7.1 it worked fine again.

    Plugin Author Gareth

    (@catapult_themes)

    Hi – all the error logs and your php file are related to your theme, not to this plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Page not loading at all, when plugin activated’ is closed to new replies.