WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Edit my theme (8 posts)

  1. ibrahimmufeed
    Member
    Posted 5 years ago #

    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:
    http://ibrahimmufeed.freehostia.com

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

  2. Len
    Member
    Posted 5 years ago #

    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 ...

    http://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,
    http://www.troublezone.net/firefox-v2/

  3. Preeminent
    Member
    Posted 5 years ago #

    Great info LenK. Thanks!

  4. ibrahimmufeed
    Member
    Posted 5 years ago #

    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.

  5. xdesi
    Member
    Posted 5 years ago #

    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.

  6. ibrahimmufeed
    Member
    Posted 5 years ago #

    Thank you,

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

  7. ibrahimmufeed
    Member
    Posted 5 years ago #

    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.

  8. Len
    Member
    Posted 5 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.