WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can an PHP experts help? (3 posts)

  1. The Night Fox
    Member
    Posted 2 years ago #

    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?

  2. Sven D.
    Member
    Posted 2 years ago #

    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>';
            }
  3. The Night Fox
    Member
    Posted 2 years ago #

    Hi Steven,

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

    TNF

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.