Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Receiving "Warning: explode" error

Discussion in 'Troubleshooting & How-To's' started by RichardRice, Mar 18, 2014.

  1. RichardRice

    New Member

    Mar 18, 2014
    Likes Received:
    I'm getting the following error on my site:

    Warning: explode() expects parameter 2 to be string, array given in /home/content/p3nexnas03/06/2064606/html/wp-content/themes/tatsoft/functions.php on line 480

    line 480 reads:

    if($break == explode(',',$break))
    The whole of the code reads:

    function sub_content($cat_name, $break = array() ) {
    	if( query_posts('posts_per_page=5&orderby=menu_order&order=ASC&post_type=wordblock&wordblock_category='.$cat_name )): // run querys
    		if($break == explode(',',$break)) // sets when to create <div class="clear both"></div> :: default is none
    			$i = 0; // slide count sets
    		<div class="entry-sub-content">
    			while(have_posts()) : the_post();
    			$i++ ; // slide count adds
    			$wb = wdblk(get_the_ID()); // grab content
    			<div class="slide-content">
    			     $link_title= $wb['title'];
                     $link_title = str_replace('&','and',$link_title);
                     $link_title = str_replace(' ','-',$link_title);
    				<h2><a href="/services/<?echo strtolower($link_title)?>"><?php echo $wb['title']; ?></a></h2>
    				<?php echo $wb['content']; ?>
    		<?php if(in_array($i,$break))
    				echo '<div class="clear both"></div>';
             endwhile; wp_reset_query(); //resets query and end while case?>
    		<?php endif; 
    Can anyone tell me how to fix this, or what I might need to chase down in order to fix?

Share This Page

Monarch Social Sharing Plugin