Gabriel de Kadt

graphic arts & design

Hacking WordPress
TO DO:Static Front page - no sweat. Simple instructions here.

Hacking Benevolence Theme


Making custom templates


Making custom "home.php" file - and "sidebar_home.php" to differentiate blog style pages from dynamically generated static content. Arse. ... need to use "include (TEMPLATEPATH . '/sidebar_home.php');" rather than a simple "get".
The get command template tags call to standard template files. The include PHP command gets template files that are standard AND non-standard template files.


home.php


home.php loses pretty much everything from original index.php - just calls in header, sidebar_home, content and footer.

sidebar_home.php


TO DO: Get a list of Pages displaying ... (need to include template tag to get Pages) example
<?php wp_list_pages('title_li=<h2>Pages</h2>'); ?>
and following on; to include the "Blog" category (no breaks - so it is a seamless list). (Blimey - getting php code to render in html is not nice.


TO DO: Getting list of Pages in the Sidebar, without "Pages" repeating...
DONE: Just remove "Pages" from inside the example above. Donkey.

TO DO: Benevolence Theme needs a (CSS?) solution to render sub-Pages nicely in the sidebar.
IN PROGRESS: using a .pagenav li.page_item li selector I can add indent - but it seems the text color won't change...
(NOTE: since I've had to re-do sidebar_home.php due to it losing all its contents - I'm getting a nice rendering of this. Magic. One thing I changed was to put the php calls to display Pages and Blog inside a title div.)

Hacking the standard templates


header.php


TO DO: Remove title from header.php (the "lazydada" bit: this should be done with some fancy graphics and such-like).
DONE: Commented out bloginfo link from blogTitle div. Knocked out a banner graphic. Very much a v1.
TO DO: do that properly - (perhaps an Image Ready navbar with fancy roll-overs: in the CSS of course)

sidebar.php


TO DO: Need to add the pages call into the regular sidebar, then exclude category "Blog" from the category listing to avoid duplication in said sidebar.
DONE: wp_list_cats('list=0'); replaced by:
wp_list_cats('sort_column=name&optioncount=1&exclude=2'); where my "Blog" category = 2

footer.php


TO DO: Modfy footer.
DONE: easy.

TO DO: Sort out permalinks
DONE: Created .htaccess file - (WP 2 is not creating the file despite what is says - tried changing permissions (using Transmit) but no joy. ) - added code as promted by WP-admin.
|