• Hi everyone!

    I wanted to add a widget area on my theme using this code:
    if (function_exists(‘register_sidebar’)) {
    register_sidebar(array(
    ‘name’ => ‘Sidebar Widgets’,
    ‘id’ => ‘sidebar-widgets’,
    ‘description’ => ‘Widget Area’,
    ‘before_widget’ => ‘<div id=”one” class=”two”>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ‘<h2>’,
    ‘after_title’ => ‘</h2>’
    ));
    }

    I added this to my widgets.php file but I renamed it by “header”. WHY DID I DO THAT?! Now this code is in my header! And I can’t have access anymore to all the php files.

    I went on my hoster website, downloading the widgets.php file in order to modify it but the coding is not in here…

    How should I do??

    Thanks a lot!
    Béné

Viewing 3 replies - 1 through 3 (of 3 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    And I can’t have access anymore to all the php files.

    Why is this, what is stopping you?

    Thread Starter benedictec

    (@benedictec)

    They are just not here anymore!
    I can see “Upload files” and below “Theme Files” and below that I am supposed to see all my php.files but they are not here. So I can’t correct my mistake!

    Therefore, the website still looks OK so I suppose they are not lost.
    You can have a look and see that the code that I posted is now in the header:
    http://www.broadgateenergy.com

    Don’t worry, you should be able t get it back to normal if you’ve backed up you theme? Find the file that supports widgets (i.e functions.pho) go into FTP and replace the .php file with the original from there.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘HELP! Can't see my php.files after wrong coding’ is closed to new replies.