• Hello everybody,

    I am using WP Modern Business. I was just programming in the theme function.php source and wanted to activate the h1 heading only for certain pages. Therefore I used the following command:
    <?php if (!is_home()): ?>
    your h1 line goes here
    <?php endif; ?>

    Somehow it did not really work and I modified the code a couple of times but with backup in my Notepad. After saving once more the Screen just brought the source code without any menu bar or something else to navigate.

    Now I am trying into WP but it does not work anymore. It tells me that “ERROR: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums.” I already made sure that there is no problem with my cookies by deleting the history and allowing all cookies to be executed.

    Above that Login Window it still shows the CSS code of the website in a strange way. Its not possible to login anymore and the website is not accessible.

    Can someone help me please!

Viewing 5 replies - 1 through 5 (of 5 total)
  • David_G

    (@questas_admin)

    You should be using a child theme for functions.php edits not the theme files themselves. How to get back to your admin now? FTP to your site (or use Cpanel file editor) go to your wp-content/themes folder and rename your theme by adding .bak or something to the theme folder, this will disable the theme and your WP will go to the default theme. Then you can get back to your admin normally. Fix your errors rename your theme and try again.

    The best way to make changes like this to a theme is to use a child theme, so your tweaks won’t be overwritten when updating the theme. Here are some guides in case you haven’t made one before:
    http://www.elegantthemes.com/blog/resources/wordpress-child-theme-tutorial
    https://codex.wordpress.org/Child_Themes
    http://op111.net/53/

    Moderator t-p

    (@t-p)

    – do you have backup of function.php taken before you tweaked it? If you do, try uploading it.
    – If that does not work, try uploading a fresh copy your theme
    – if nothing works, ask your hosting provider if they have backup of your site taken sometime before you tweaked it. If they do ask them to restore your site with it.
    – If you immediately need to get in the dashboard, them try switching to the unedited default Twenty Fifteen theme. If you don’t have access to your admin area, use FTP , or your web-host’s cPanel or whatever file management application your host provides. Navigate to /wp-content/themes/ and switch to the default theme by renaming your current theme’s folder by adding “-old” to the end of the folder name. Alternately, you can remove other themes except the default theme. That will force your site to use it.

    Thread Starter Statou

    (@statou)

    @questas_admin:
    I do not have a FTP connection or backup. I just made a manuel backup by copying all the content of the websites. Therefore I cannot access into FTP and change the name to default the theme. Is there another way to default the theme, maybe without being logged in?

    @tara:
    The problem is I cannot access my WP-Account. Therefore I cannot upload a new copy of the file. The main problem is that I cannot login into my WP-account anymore. If that would be possible I could fix the theme issue. Do you know how I could get access to it?
    From where do I know who my Webhost is and which file management application it provides / supports?

    David_G

    (@questas_admin)

    IS your site a self hosted wordpress.org site or wordpress.com? If it’s a self hosted site you should have FTP access. Contact your host in how to establish an FTP connection. As both myself and @tara have explained, this is how you need to fix your issue.

    Thread Starter Statou

    (@statou)

    Ok, thank you very much both. I will try find out and hopefully get back to you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to login into WordPress after changing theme function.php’ is closed to new replies.