site is having broken links

5 replies
plz help me warriors. I am in a big trouble.Yesterday i was going to add adsense code in my function.php in wordpress.but when i was going to update after pasting adsense code my all links are broken.only my website front page is opening but my posts,pages even my wordpress admin is having broken link not opening,.plz help what should i do..
Am i having a server problem or having another proble.If having another problem plz give the solution.
#broken #links #site
  • Profile picture of the author helfgott
    Hmm, obviously seems that you "touch" something there.

    I have some Wordpress Blogs but i've never changed anything in code of them, only in Joomla.

    But as my understanding you could:

    Drastical:
    - Copy the main code of other Wordpress with the same Template or the same file and replace it in the the broken Wordpress site. (it will restore the original configuration and you lost any changes you had). FIRST BACKUP THE BROKEN ONE (Copy it in some txt if you have to go back)

    Not so drastical
    - Check the piece of code that you've touched, look for a simple or double quotes incomplete or a non-closed <?php ?> php tag. (This would be the best try)

    Paste the Piece of code where you've pasted the adsense script and post it here, maybe it can give a better idea of what you've done.

    I guess you already tried removing the Adsense code, right?

    BTW:
    Remember if you're working in a php file you can't paste directly a Javascript "script", you should do something like this:

    <?php

    echo '<script> adsense stuff</script>';

    ?>

    Take care with simple, double quotes, the semi-colon at the end of any sentence, open and close tags of php.

    Hope it helps.
    {{ DiscussionBoard.errors[4756517].message }}
    • Profile picture of the author jmartinez
      If this happened after you updated functions.php just then it's probably an error from the code that you added. Try removing the code you added and see if it fixes it. If that doesn't work, try finding a copy of the functions.php for your theme and load that in. If that still doesn't work then try loading another theme and see if it works.

      It's usually a matter of troubleshooting your way through it. It's probalby not as bad as it seems. As soon as you fix the little bug everything should work again.
      {{ DiscussionBoard.errors[4756576].message }}
    • Profile picture of the author ravi2011
      but from where should i copy function.php code and from where i will paste..
      my wordpress admin also not opening, and i also dont have knowledge how to fix it from cpanel..
      {{ DiscussionBoard.errors[4758613].message }}
  • Profile picture of the author ravi2011
    my site is ok now.I uploaded original function.php file.Thanks for your help warriors
    {{ DiscussionBoard.errors[4759419].message }}
    • Profile picture of the author helfgott
      Originally Posted by ravi2011 View Post

      my site is ok now.I uploaded original function.php file.Thanks for your help warriors
      Cool, and be carefull next time
      {{ DiscussionBoard.errors[4761980].message }}

Trending Topics