rather than using the shortcode and adding weird archive pages, i wanted to make my normal category archive pages show the snazzy archives, replacing the usual archives altogether.
basically, you edit the 'archive.php' page in your 'appearance>theme editor'
removing (or just commenting out) the usual post display, and adding in the snazzy archive shortcode, within php because shortcodes don't work outside of the posts and pages by themselves.
if you have any questions, please contact me via the form on ladyboneswebdesign.com :)
/*Add the Snazzy Archives*/
/*Comment out the usual archives*/ <!–
Archive for the ‘’ Category
Posts Tagged ‘’
Archive for
Archive for
Archive for
Author Archive
Blog Archives
<div > <h3 id="post-"><a href="" rel="bookmark" title="Permanent Link to ">
<?php the_tags('Tags: ', ', ', ' '); ?> Posted in
<?php else :
if ( is_category() ) { // If this is a category archive printf("
Sorry, but there aren't any posts in the %s category yet.
", single_cat_title('',false)); } else if ( is_date() ) { // If this is a date archive echo("
Sorry, but there aren't any posts with this date.
"); } else if ( is_author() ) { // If this is a category archive $userdata = get_userdatabylogin(get_query_var('author_name')); printf("
Vladimir’s WordPress Forum
thought i'd share this code to add snazzy archives to all archives pages automatically
23:27
11 June, 2011
tanya bones aka Lady
rather than using the shortcode and adding weird archive pages, i wanted to make my normal category archive pages show the snazzy archives, replacing the usual archives altogether.
basically, you edit the 'archive.php' page in your 'appearance>theme editor'
removing (or just commenting out) the usual post display, and adding in the snazzy archive shortcode, within php because shortcodes don't work outside of the posts and pages by themselves.
if you have any questions, please contact me via the form on ladyboneswebdesign.com :)
/*Add the Snazzy Archives*/
/*Comment out the usual archives*/
<!–
Archive for the ‘’ Category
Posts Tagged ‘’
Archive for
Archive for
Archive for
Author Archive
Blog Archives
<div >
<h3 id="post-"><a href="" rel="bookmark" title="Permanent Link to ">
<?php the_tags('Tags: ', ', ', '
'); ?> Posted in
<?php else :
if ( is_category() ) { // If this is a category archive
printf("
Sorry, but there aren't any posts in the %s category yet.
", single_cat_title('',false));
} else if ( is_date() ) { // If this is a date archive
echo("
Sorry, but there aren't any posts with this date.
");
} else if ( is_author() ) { // If this is a category archive
$userdata = get_userdatabylogin(get_query_var('author_name'));
printf("
Sorry, but there aren't any posts by %s yet.
", $userdata->display_name);
} else {
echo("
No posts found.
");
}
get_search_form();
endif;
?>
–>