WordPress.org

Ready to get started?Download WordPress

Forums

Three Column Kubrick (7 posts)

  1. kingjeffrey
    Member
    Posted 9 years ago #

    Here is my modification of kubrick: http://www.threebadfingers.com. I still need to change use of some IDs to Classes in the right sidebar searchforms.

    To convert kubrick to a three column format, I added get_sidebarLeft() and get_sidebarRight() functions to wp-includes/template-functions-general.php. This works great, but I am concerned that this file will be overwritten when upgrading. Is there a better place to define functions within the theme to provide for more modular code?

  2. angsuman
    Member
    Posted 9 years ago #

    How about creating a plugin which goes with the theme? I have done the same when re-designing Simple Thoughts Blog.

    There is also another option. Create the functions in a file, which is included in your theme. This way the file resides within the theme directory.

  3. kingjeffrey
    Member
    Posted 9 years ago #

    I created a new file theme-functions.php defining the get_sidebarLeft() and get_sidebarRight() functions. I saved this file to the theme's folder, and deleted the same function definations from wp-includes/template-functions-general.php. The functions were not recognized when I refreshed the browser. Do I need to call the theme-functions.php file so the function definations can be found? If so, how do I do this? If not, what am missing?

  4. angsuman
    Member
    Posted 9 years ago #

  5. angsuman
    Member
    Posted 9 years ago #

    > and deleted the same function definations from wp-includes/template-functions-general.php

    Do not modify/delete the core functionaility.
    Rather write your own and use them in your code. That way people can easily use your theme. If necessary name them slightly different yet meaningful to avoid name space collision.
    > Do I need to call the theme-functions.php file so the function definations can be found?

    You need to include it in header.php. Please see my post mentioned above for details.

    Three column Kubric will be a very useful theme. I wish you success.

  6. kingjeffrey
    Member
    Posted 9 years ago #

    Thanks angsuman. Per your recommendation, I inserted <? include("theme-functions.php") ?> into the header. This calls the new functions within the theme, removing any need to tinker with the core code.

  7. lcf
    Member
    Posted 9 years ago #

    Hi,

    I made a three-column theme base on the default two-column Kubrick theme. Hope you like it. :-)

    Link:
    http://www.liewcf.com/blog/archives/2005/05/wordpress-three-columns-kubrick-theme/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.