Forums

Google Search Description Problem, Please Help (8 posts)

  1. mlao
    Member
    Posted 1 year ago #

    Hi
    On Google Search Description I get this instant of my normal description: Warning: Invalid argument supplied for foreach()
    Why this is happent? And how can I fix it?
    Thank you.

  2. mlao
    Member
    Posted 1 year ago #

    Anyone can help?

  3. Reuben Gunday
    Member
    Posted 1 year ago #

    Maybe Google indexed your page when that error is present on your site.. Wait until Google updates your content.

  4. mlao
    Member
    Posted 1 year ago #

    I see my Check Error Logs and the problem is still here public_html/nighthawkjourneys/nightlife-blog/wp-content/themes/varg/header.php on line 8

    And here is what i have on line 8
    foreach ($metatags as $tagpost) {

  5. Reuben Gunday
    Member
    Posted 1 year ago #

    change that line to
    @froeach($metatags as $tagpost){
    or a better way is

    if( is_array($metatags) ){
      foreach($metatags as $tagpost){
        /*The rest of the code here*/
      }
    }
  6. mlao
    Member
    Posted 1 year ago #

    I dont make this yet, but I deactivate a plugin and now I dont have error on my Check Error Logs. But unfortunately on search results im still get on descriptions: Warning: Invalid argument supplied for foreach() in ... public_html/nighthawkjourneys/nightlife-blog/wp-content/themes/varg/header.php on line 8,

    even if google bots for exable Cached page today,
    why is that still happens ?

  7. mlao
    Member
    Posted 1 year ago #

    I add this code @froeach($metatags as $tagpost){
    but I get SQL error!

  8. mlao
    Member
    Posted 1 year ago #

    you can see the problem live if you add this keywords (macau nightlife)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.