1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

killed my wp blog - expert help please....

Discussion in 'Blogging' started by aamcle, Jul 24, 2010.

  1. aamcle

    aamcle Registered Member

    Joined:
    Feb 1, 2010
    Messages:
    90
    Likes Received:
    1
    Please help I thing I've commuted blogiside, I had set up a simple static site with an Artisteer template and it was looking quite nice.
    But there is a bug in Artisteer that effects the footer making it impossible to make the links to Contact, Terms and so on work, on saving "\\\" slashes are inserted into the target URL and obviously they don't work.
    I found a solution on the Artisteer forum edit the functions file:-

    Code:
       <textarea name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" style="width:100%;height:100px;"><?php
    
                    if( get_settings($value['id']) !== false) {
    
                            echo get_settings($value['id']);
    
                        }else{
    
                            echo $value['std'];
    
                    }?></textarea>
    
      
    
    Change the forth line  
    
    from: echo get_settings($value['id']); 
    to: echo stripslashes(get_settings($value['id'])); 
    
    note: the original line is enclosed by  stripslashes() 
    
       <textarea name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" style="width:100%;height:100px;"><?php
    
                    if( get_settings($value['id']) !== false) {
    
                            echo stripslashes(get_settings($value['id']));
    
                        }else{
    
                            echo $value['std'];
    
                    }?></textarea>
    
    I did that saved the change and my blog is as dead as a kipper!!!

    I'm hoping that if I FTP in I should be able to manually edit the file back to it's original state.

    I've a couple of questions.

    Where is the functions file located in the WP installation?
    Should this approach work? It's only a small site I have the template so I can re-build in just a few hours.

    Thanks for your help gents.



    aamcle
     
  2. ryanisme

    ryanisme Newbie

    Joined:
    Apr 16, 2010
    Messages:
    19
    Likes Received:
    0
    Occupation:
    trying to make money online
    Location:
    In my head mostly. Not a nice place.
    I am assuming you edited the file inside of wordpress with the editor. Never do that. Get a FTP program, and get to know the structure of your directory(ies).

    The functions file should be under WP-Content/Themes/your theme

    When you sort out the error, I would suggest using a different theme/template.
    There are so many free ones out there If I try one out that has an issue I just drop it and move on to an new one.
     
    Last edited: Jul 24, 2010
  3. Barnaby

    Barnaby Newbie

    Joined:
    Jul 30, 2009
    Messages:
    21
    Likes Received:
    10
    So are you saying you edit the live files on your host server? Do you have the original file saved somewhere on your local computer?

    I know this won't help you much now, but from here forward I would make sure to have a local set of all site files saved. Then anytime you make changes to a file (which I would probably do locally as well, then re-upload), be sure to rename the original to something you'll remember so you'll have it available to you in case of situations like this (something like 'original_functions.php' or '072410_functions.php')

    Good luck restoring your site!
     
  4. origin

    origin Regular Member

    Joined:
    Nov 11, 2008
    Messages:
    334
    Likes Received:
    90
    Home Page:
    You can also revert your theme back to a working one via phpMyAdmin, replace theme name in Settings table.
     
  5. aamcle

    aamcle Registered Member

    Joined:
    Feb 1, 2010
    Messages:
    90
    Likes Received:
    1
    I found the file and tried to edit it using plesk but I'm not the owner WP is so I can't save the changes.
    I've had this with another blog I couldn't re-set the permissions even via FTP.

    I'll re-build and call it experience but I'd like to stick with the theme as the result looks just like a static site and in practice I'm using WP as a content management system

    Thanks all aamcle
     
  6. aamcle

    aamcle Registered Member

    Joined:
    Feb 1, 2010
    Messages:
    90
    Likes Received:
    1
    Happy Dayz..........:):)

    I did as suggested and edited the database to use a previous template then deleted and reinstalled the one I want to use.

    I'll be more careful about using the internal editor in future.


    Many Thanks aamcle