Category Archives: Wordpress theme/framework

WordPress plugin: Page Links To – Allows you to point WordPress pages or posts to a URL of your choosing

Ever want to have a menu tab of a WordPress site linked to an outside page? Use Page Links To, this WordPress plugin allows you to point WordPress pages or posts to a URL of your choosing. Good for setting up navigational links to non-WP sections of your site or to off-site resources.

Thematic Framework: Remove a Thematic action ======================================= Here’s the code to put inside your child theme’s function.php: // Remove default Thematic actions function remove_thematic_actions() { remove_action(‘thematic_hookname’,’thematic_actionname’,optionalpostitionnumber); } add_action(‘init’,’remove_thematic_actions’);

WordPress: create a page template that displays posts from a category that has the same name as the page.

Question: How to create a page template that displays all the posts from a category that has the same name as the page itself? Answer: Here’s the code: <?php /* Template Name: ListPostsInCategoryThatHasSameNameAsPage */ ?> <?php get_header(); ?> <div id=”content”> <div id=”main”> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> […]

WordPress: exclude categories from being displayed on home page.

PHP code to put in the file function.php of your child theme: // Used to limit the categories displayed on the home page. function exclude_category($query) { if ( $query->is_home ) { $query->set(‘cat’, ‘-11,-12,-13’); } return $query; } add_filter(‘pre_get_posts’, ‘exclude_category’); Note: replace -11, -12, -13 with the ID# of your categories. =============================== Read more here: […]

Custom style sheet and templates for NextGen Gallery (with special instructions for child themes)

NextGen Gallery is a great plugin for your WordPress site’s galleries. But often you would like to customize its look to suit your needs. Here’s how: Create custom template files for NextGen Gallery: Custom templates are PHP files that can be stored in the folder /nggallery/, which you can create inside your theme directory. NextGEN […]

Thematic: custom div.access and resize Search field’s <input> size

View example: <?php // Create a custom access div with the menu and search box function HYG_access() { ?> <div id=”search_box”> <form id=”searchform” method=”get” action=”<?php bloginfo(‘home’) ?>”> <div> <input id=”s” name=”s” type=”text” value=”<?php echo wp_specialchars(stripslashes($_GET[‘s’]), true) ?>” size=”22″ tabindex=”1″ /> <input id=”searchsubmit” name=”searchsubmit” type=”submit” value=”<?php _e(‘Search’, ‘thematic’) ?>” tabindex=”2″ /> </div> </form> </div><!–search_box–> <div id=”access”> […]

Thematic: custom footer text

/* footer text set in Theme options in Dashboard\Appearance */ View example:

Thematic: add a custom header

View example: The code: <?php //Create a new header function HYG_header() { ?> <p><?php bloginfo(‘name’) ?></p> <a href=”<?php bloginfo(‘url’) ?>/home/” title=”<?php bloginfo(‘name’) ?>” rel=”home”><img id=”logo” SRC=”<?php bloginfo(‘stylesheet_directory’); ?>/images/hyg_ident-3Da.gif” onMouseOver=”this.src = ‘<?php bloginfo(‘stylesheet_directory’); ?>/images/hyg_ident-3Db.gif’;” onMouseOut=”this.src = ‘<?php bloginfo(‘stylesheet_directory’); ?>/images/hyg_ident-3Da.gif’;”></a> <img id=”header_text” SRC=”<?php bloginfo(‘stylesheet_directory’); ?>/images/header_text.gif”> <?php } add_action(‘thematic_header’,’HYG_header’,1); ?> =============================

Thematic: Add a Search box to Thematic menu

Thematic framework: How to move main navigation out of header, into div “main” ============================== In childtheme’s functions.php: <?php // Remove default Thematic actions function remove_thematic_actions() { remove_action(‘thematic_header’,’thematic_access’,9); } add_action(‘init’,’remove_thematic_actions’); add_action(‘thematic_abovemainasides’,’thematic_access’,9); ?>