Thursday, July 19, 2012

Custom Pages


2. Custom Pages

If you want to edit the Thesis 404 page or Archives page like I have, check out the codes I used:

Archives Page

The default Archives page that comes with Thesis is great, but I want to do more with mine (still under construction by the way). Here is the code you can use to edit the Archives template fromcustom_functions.php
function new_archives() { ?>
 <p>New Archives Page</p>
<?php }

remove_action('thesis_hook_archives_template', 'thesis_archives_template');
add_action('thesis_hook_archives_template', 'new_archives');

404 Page

I got the following code from Rae Hoffman (Suggarrae).
function custom_thesis_404_title() {
?>
YOUR 404 PAGE HEADING HERE
<?
}

remove_action(’thesis_hook_404_title’, ’thesis_404_title’);
add_action(’thesis_hook_404_title’, ’custom_thesis_404_title’);

function custom_thesis_404_content() {
?>
<p>WHATEVER YOU WANT YOUR 404 PAGE TO SAY HERE</p>
<?
}

remove_action(’thesis_hook_404_content’, ’thesis_404_content’);
add_action(’thesis_hook_404_content’, ’custom_thesis_404_content’);

No comments:

Post a Comment