• Resolved ibrahimmufeed

    (@ibrahimmufeed)


    Hi there,

    Recently I change my theme to a new one that is not widget-aware. I like the new theme so much but I still having some problems with it.

    First question is: is there any easy way that may help me to make it widget-ware?
    ps: I read the instructions wordpress suggest but I could not do it.

    Second: I edit my sidebar on Sidebar.php file and it is fine, but the problem is, there still two widgets “not really widgets”, that still appear even I did not find there code, they are the “Links” and the “Meta”. I need to delete “Meta” and keep the Links.

    here is my website:
    https://ibrahimmufeed.freehostia.com

    Can anybody here help me.
    Thank you for your time.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Making your theme widget-aware is not difficult at all. I see your theme is an older theme (pre-WordPress 2.0). First create a new file called functions.php and insert the following …

    <?php
    if ( function_exists(’register_sidebar’) )
    register_sidebar();
    ?>

    Take care not to include any spaces before or after the opening/closing php tags. Upload the file to your theme’s folder. Next, open up sidebar.php and directly after the opening <ul> tag insert the following …

    <?php if ( !function_exists(’dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?>

    Scroll down further and and just before the closing </ul> tag insert the following …

    <?php endif; ?>

    Be advised that most themes are designed such that the sidebar is contained within an unordered list. If your theme is not (and I suspect it isn’t) you’ll need to have a look at these instructions …

    https://automattic.com/code/widgets/themes/

    Scoll down to the heading –> My sidebar isn’t a list. What do I do?

    Or, you can get an updated and widget-aware version of that theme here,
    https://www.troublezone.net/firefox-v2/

    Great info LenK. Thanks!

    Thread Starter ibrahimmufeed

    (@ibrahimmufeed)

    Thank you for help,

    It is really unordered list , I do the steps you told me but the problem is when I upload the file Functions.php to the right directory I could not see it in the theme editor. I tried for along time but till now I could not see the file.

    ps: I use Fireftp, and when I finish the file transfare I see it in the website folders in the current directory.

    Thank you.

    functions.php should be start with a small F not capital.
    All it needs inside it is this:

    <?php
    if ( function_exists(’register_sidebar’) )
    register_sidebar();
    ?>

    As suggested above.
    Then edit your sidebar.php to include the new sidebar as above.

    Thread Starter ibrahimmufeed

    (@ibrahimmufeed)

    Thank you,

    I have just found it, it was already small f.

    Thread Starter ibrahimmufeed

    (@ibrahimmufeed)

    After I found the file, I continue working with the next step.

    After each Unordered List opining tag I added the code:

    <?php if ( !function_exists(’dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?>

    and before the end tag of the Unordered List I insert the code:
    <?php endif; ?>

    I save the file sidebar.php. and go to the Widget subtab under the Design tab, but it still says that “No Sidebars Defined”.

    Anybody can help please.
    ps: I may give the login and the password of my blog if someone is able to do it for me.

    Thank you.

    Hi Ibrahim.

    Got your email. As I said in my reply I’m extremely busy with work the last couple of months (which is why I haven’t been very active here in the forum) but I’ll see what I can do for you. You can contact me off-forum again if you wish.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Edit my theme’ is closed to new replies.