Theming
Custom Field to Define Sidebar
Sidebar can be selected according to a custom field on the page:
Read MoreAdditional Image Sizes
In THEME/functions.php if (function_exists(‘add_image_size’)) { add_image_size(‘category-thumb’, 280, 9999); //280px wide unlimited height add_image_size(‘item_detail’, 400, 500, true); // cropped } To use new image sizes
Read MoreFeatured Image Size
To show featured image in theme: To specify size from media settings: Specify max size: (may not work in WP 3+)
Read MoreDisplay list of links
To show a list of links from the admin links section in a template: Where $args can include the following:
Read MoreInclude Custom Template File
To include a file in the themes folder in another theme file: will include the file special.php in the current file. Parameters are $slug and $name will load navbar-special.php ie: slug = navbar (required) and name = special (optional)
Read MoreCustom Sidebars
Register Custom Sidebars in THEME/functions.php add_action( ‘widgets_init’, ‘my_register_sidebars’ ); function my_register_sidebars() { register_sidebar( array( ‘name’ => __( ‘Primary Widget Area’), ‘id’ => ‘primary-widget-area’, ‘description’ => __( ‘The primary widget area’ ), ‘before_widget’ => ‘ ‘, ‘after_widget’ => ‘ ‘, ‘before_title’ => ‘ ‘, ‘after_title’ => ‘ ‘, ) ); register_sidebar(array( ‘id’ => ‘topwidget’, ‘name’ =>…
Read MoreRemove >> before list items in Sidebar
In style.css comment out this statement .entry ul li:before, #sidebar ul ul li:before { content: “0BB 020”; }
Read MoreAdd Styles to Admin Editor (TinyMCE)
Add to functions.php add_editor_style(); Create editor-style.css in theme folder
Read More