Support » Themes and Templates » Raindrops Error

  • The following error is appears (twice) at the top of my page:

    Warning: Invalid argument supplied for foreach() in /home/content/60/11341260/html/wp-content/themes/raindrops/functions.php on line 10495

    I’ve checked and it appears regardless of what browser I’m using. I’m uninstalled plugins and it remains. I changed to twenty eleven theme and it went away, putting the issue with raindrops. I prefer raindrops theme over all others I’ve seen and would very much like to remain with it, so hopefully someone knows of a fix?

    I am currently running 1.280 Raindrops theme.

    Thanks in advance

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi TIJ

    This error is a bug that occurs when you have not made a primary menu.

    If you set the primary menu bug you will not be out

    In order to completely fix, in functions.php, please add the following function.

    Add theme functions.php top.

    // Adding code Start
    	function raindrops_get_classes_from_primary_menu(){
    		$menu_slug = 'primary';
    		$locations = get_nav_menu_locations();
    		if (isset($locations[$menu_slug])) {
    			$menu_id = $locations[$menu_slug];
    			$items = wp_get_nav_menu_items( $menu_id ) ;
    			$class_strings = '';
    			if( isset( $items ) && ! empty( $items ) ) {
    				foreach( $items as $val){
    						$class_strings .= ' '. implode( ',', $val->classes ).' ';
    				return esc_attr( $class_strings );
    			} else {
    				return false;
    		return false;
    // Adding Code END
     * functions and constants for Raindrops theme
     * @package Raindrops
     * @since Raindrops 0.1
    if ( !defined( 'ABSPATH' ) ) {

    This bug, I will fix in the next update

    Thank you.

    I’m pretty novice about editing code and the like (and I’m pretty sure I just jacked up my functions page :-/) Where exactly do I insert this code?

    Yeahhh, now I’m getting this error: Parse error: syntax error, unexpected ‘<‘ in /home/content/60/11341260/html/wp-content/themes/raindrops/functions.php on line 36

    And can’t seem to get back into the editor; what’ve I done!

    Ok, I fixed the parse error – but I need to know where in the code I am supposed to put this fix as to not cause another parse error. Thanks in advance.

    The function that has a problem, you certainly present in 10495 lines,

    but when ask it to you, but it is cumbersome to fix

    Raindrops is, because it is the most function to pluggable,

    you can write the same function in front of the code.

    I’m not going to lie. I’m not sure what you just said.

    Should I put the code you told me to insert at the start of the function.php page or elsewhere in the code? If elsewhere in the code, where? If like 10495 – how do I know which line that is?

    Whether my words are transmitted to you correctly?

    lie? ,I’m not think that

    put this fix as to not cause another parse error

    Your Question is
    An error that has occurred in the 10 495, or can be solved by writing a function at the beginning of the functions.php ?

    If, When you have found a parse error, please let me know.

    I’ve dealt with the parse error and downloaded a fresh version of raindrops. The Parse error is no longer an issue. It was caused by my faulty editing/coding. However, the original error (see below) continues:

    Warning: Invalid argument supplied for foreach() in /home/content/60/11341260/html/wp-content/themes/raindrops/functions.php on line 10495

    You’ve posted above that this is due to an error in the theme that you intend to fix with the next update. You’ve provided code that I can edit into my functions.php page. I’m not certain where I should put this code on the page. Can you please assist with that direction.

    I, I would like to supply a good theme.

    However, it is true that there is an error to be overlooked.

    I, like you, by the people who pointed out the problems, and that could make a better theme.

    You, at any time can be referred to any opinion on the theme.

    I, if it is reasonable, will spare no effort.

    I’m always looking for a friend in order to better this theme

    My biggest worry is, English is that bad

    Thank you.

    I really like this theme, it’s the only one that fits my needs.

    My problem is I don’t know where to put the code you posted above into the functions.php page to remove the error. Can you tell me Please?

    Hey TIJ…
    I also was having problems understanding the Authors English ! LOL
    However I was able to make the problem go away by going to Appearance>Customize and under the Navigation section select a Menu (probably Menu 1) and then select to Show or Hide.

    This resolved the problem and I was able to re-create the error by changing the menu back to -Select-

    Hope this helps 🙂

    Thanks Donnie – I tried to hide menu1 and it didn’t remove the error. Thanks for trying and I’m glad it worked for you!

    The code provided may fix the error, but I’m not certain where to put it in the functions page.

    Hi Donnie
    I had the same issue, followed your advice and selected Menu1>Show and hey presto it worked!!
    BTW I couldn’t understand the english either…I wonder if it was google translated? LOL
    thanks very much

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Raindrops Error’ is closed to new replies.