background preloader

Wordpress Themes Dev

Facebook Twitter

Support » Create 3 horizontal boxes between menu and container. Basically, look into the code in Twenty Ten, and see how they have done this with the footer widget area. it is more-or-less a copy/paste with changing each reference to 'footer', in the text and code, to 'top'; and reducing it to three widgets ;-) step-by-step: 1. edit header.php: after the last line (shown below as well), add: 2. make a copy of sidebar-footer.php and save it under the name of sidebar-top.php; edit it to change all references to 'footer' into 'top'; reduce widgets to three; the code should look like: 3. edit functions.php; locate the registration for the dynamic sidebar of the footer; copy the area, paste it just below the copied codes, make sure it is within the right location, and edit all references to 'footer' into 'top' matching the terms used in sidebar-top.php; the new area should look like this: in the context of the whole functions.php as ref:

WP TIPS. Widgetizing Themes. Languages: English • Français • 日本語 • Português do Brasil • 中文(简体) • Македонски • (Add your language) What is Widgetizing? Widgetizing is a pseudo word that describes the process of implementing Widgets and Widget Areas into your Theme. How to Register a Widget Area The following should be added to your Theme's functions.php file: <? Php /** * Register our sidebars and widgetized areas. * */ function arphabet_widgets_init() { register_sidebar( array( 'name' => 'Home right sidebar', 'id' => 'home_right_1', 'before_widget' => '<div>', 'after_widget' => '</div>', 'before_title' => '<h2 class="rounded">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'arphabet_widgets_init' ); ?

> How to display new Widget Areas You can display your new widget area by: Adding the code directly to a theme file like the sidebar.php file; or Using a custom function with hook in your functions.php file. Here's some example code that is a common way to add your new widget area to a parent or child theme: Thirty Ten | Just another Twenty Ten Child Theme. Introducing Thirty Ten WordPress 3.0 is introducing a new theme that is light years ahead of Kubrick (also known as default in the backend), that looks so good you won’t even mind running it on a live site. In addition to being a beautiful theme in it’s own right, it’s also easy to build upon and create your own child themes for. I’ll show you just how easy it is to make some substantial changes. We are going to move the two column Twenty Ten to a three column theme I’m going to call Thirty Ten. I’m going to lay out a couple of ground rules for myself when building this theme: I’m not allowed to override any of the template files with my own version.

I want this to be as easy to maintain as possible. Version 1.1.4 I fixed a couple of bugs and have released a new version. Version 1.1.3 I just uploaded a small update to fix a bug with adding additional themes. Version 1.1.2 I’ve just uploaded version 1.1.2 which makes use of the new edit_theme_options capability introduced in 14111. Using Action Hooks in WordPress Child Themes. In this post we’ll review how to write a PHP function and go over the basic idea of how you can use Action Hooks in your WordPress Theme.

We’ll take a look at a practical example of injecting a Welcome Blurb into your Theme without touching the existing code and we’ll also look at how to remove existing content being injected into Theme Hooks. Packing Up A Function Action hooks are in a lot of WordPress Themes nowadays. There’s a good reason for that but you’re probably wondering what the big deal is right? They’re such a big deal because firstly, they’re incredibly easy to use and secondly, because they’re extremely powerful. If you want to get started with them we’re going to have to take a look at how to write a PHP function again. So that’s how you write a PHP function. You’ve seen the same thing before with WordPress functions like wp_list_pages() or the_content().

The Basic Idea Behind Action Hooks WordPress Themes use a pair of default hooks called wp_head() and wp_footer(). Template Hierarchy. Languages: English • Français • Italiano • 日本語 • 한국어 • Русский • Español • Português do Brasil • 中文(简体) • (Add your language) Introduction WordPress Templates fit together like the pieces of a puzzle to generate the web pages on your WordPress site.

Some templates (the header and footer template files for example) are used on all the web pages, while others are used only under specific conditions. What this article is about This article seeks to answer the following question: Which template file(s) will WordPress use when it displays a certain type of page? Who might find this useful Since the introduction of Themes in WordPress 1.5, Templates have become more and more configurable. Using Conditional Tags WordPress provides more than one way to match templates to query types. The Template File Hierarchy The General Idea WordPress uses the Query String — information contained within each link on your website — to decide which template or set of templates will be used to display the page. Examples. Child Themes. Languages: বাংলা • English • Italiano • 日本語 • 한국어 • Español • Nederlands • Français • Português do Brasil • Русский • Slovenčina • ไทย • 中文(简体) • 中文(繁體) • Македонски • (Add your language) A child theme is a theme that inherits the functionality and styling of another theme, called the parent theme.

Child themes are the recommended way of modifying an existing theme. Why use a Child Theme? There are a few reasons why you would want to use a child theme: If you modify a theme directly and it is updated, then your modifications may be lost. How to Create a Child Theme Creating a Child Theme from an Unmodified Parent Theme A child theme consists of at least one directory (the child theme directory) and two files (style.css and functions.php), which you will need to create: The child theme directory style.css functions.php The first step in creating a child theme is to create the child theme directory, which will be placed in wp-content/themes. A couple things to note: <? Template Files <? If ( !