Forums

Wrong URL in google when I search for my content and page displays error msg (5 posts)

  1. youroptihealthsite
    Member
    Posted 11 months ago #

    Hi all,
    I have an article on my website that is meant to have this url: http://youroptihealthsite.com/healthy-eating-and-living-for-kids-and-teenagers

    On my website, everything is fine and the links work.
    However, when I search for my content on google (ie: 'Healthy eating and living for kids and teenagers' into the google search bar), it links to a URL: http://youroptihealthsite.com/healthy-eating-and-living-for-kids-and-teenagers/kids which is incorrect.

    Furthermore, when I click into it, the following error message is displayed:

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/regixc/public_html/wp-content/themes/orange-flower/functions.php on line 51

    Would anyone know how I can go about resolving this? I would really appreciate any help or advice! I'm really new to this!

    Sincerely,

    Regie

  2. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 11 months ago #

    I'd do it via .htaccess redirect.

    Toss this in ABOVE the WordPress calls.

    Redirect 301 /healthy-eating-and-living-for-kids-and-teenagers/kids http://youroptihealthsite.com/healthy-eating-and-living-for-kids-and-teenagers/
  3. youroptihealthsite
    Member
    Posted 11 months ago #

    Hi Ipstenu,

    Thanks for your help, but I'm really sorry, I'm an absolute newbie when it comes to this and this sounds like the stupidest question in the world... but how do I get to htaccess redirect and where is this wordpress calls?

  4. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 11 months ago #

    There is a file called .htaccess, it's in your folder at the same level as wp-config.php

    http://codex.wordpress.org/Using_Permalinks#Where.27s_my_.htaccess_file.3F

  5. youroptihealthsite
    Member
    Posted 11 months ago #

    Thanks! =]

Reply

You must log in to post.

About this Topic