• Resolved The Night Fox

    (@the-night-fox)


    Ok so I’m trying to simply add some code to the Google news plugin so that all the results are nofollowed. I located the code where rel=”nofollow” needs to be inserted, but my poor knowledge oh php means that no matter what I do I get an error!

    $result .= "<li>$description</li>";
                    } else {
                            $result .= "<li><a href=\"$link\" target=\"_blank\" ".
                                       "title=\"$tooltip\" "rel=\"nofollow\">$title<br>$related[1]</a></li>";
                    }
                }
                return $result.'</ul>';
            }

    I always get the error: Parse error: syntax error, unexpected T_STRING in /filepath/wp-content/plugins/google-news/google_news.php on line 747

    Can anyone help me fix this fairly simple problem?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi

    Try this:

    $result .= "<li>$description</li>";
                    } else {
                            $result .= "<li><a href=\"$link\" target=\"_blank\" ".
                                       "title=\"$tooltip\" rel=\"nofollow\">$title<br>$related[1]</a></li>";
                    }
                }
                return $result.'</ul>';
            }
    Thread Starter The Night Fox

    (@the-night-fox)

    Hi Steven,

    Thanks for the help, that worked perfectly! Feel a bit silly for not noticing the extra quotation mark!

    TNF

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can an PHP experts help?’ is closed to new replies.