• Resolved brinxomd

    (@brinxomd)


    I recently added this code to the top of functions.php (after the <?php):

    add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
    function add_login_logout_link($items, $args) {
            ob_start();
            wp_loginout('index.php');
            $loginoutlink = ob_get_contents();
            ob_end_clean();
            $items .= '<li>'. $loginoutlink .'</li>';
        return $items;
    }

    and since then my site says “The server encountered an internal error or misconfiguration and was unable to complete your request.”

    I since removed the code but I’m still getting this error message. I tried narrowing down the issue by: renaming the theme folder, renaming plugin’s folder, renaming htaccess file and none of those things worked. What do you think would be my best solution?

    my site: https://www.biblebatch.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • You can try to re-upload all WordPress files again and do not modify core files again.
    If you need to add something to function.php the good way is to create child theme and do all modification there.

    Thread Starter brinxomd

    (@brinxomd)

    Thanks for the reply.

    Which files are core files? Do you mean just install a fresh copy of wordpress?

    Hi,

    If you will delete everything and do fresh install, its fresh install ?? so you will lose your content.
    So rename all plugins/themes.
    Which files did you modified in wordpress? Try download core wp theme 2015 and unzip and upload it to your folder with ftp – wp-content/themes/
    Delete also htaccess file. It will be created.

    Thread Starter brinxomd

    (@brinxomd)

    Thanks Peter!
    I was able to get back in. I used ur advice to find this link… https://codex.www.ads-software.com/Updating_WordPress and that basically helped me to get back in. But I still have to fix my theme issue but at least I’m in.

    David_G

    (@questas_admin)

    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:

    https://codex.www.ads-software.com/Child_Themes
    https://op111.net/53/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘functions.php seemed to have broken my site’ is closed to new replies.