From 573b7fffa837fac0445f5a02ca0989bbcd0552c2 Mon Sep 17 00:00:00 2001 From: Michael Allen Date: Thu, 1 Nov 2012 16:14:55 -0500 Subject: [PATCH] Set up default permalink structure in functions, nice function for site logo --- functions/general.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 functions/general.php diff --git a/functions/general.php b/functions/general.php new file mode 100644 index 0000000..3aa4362 --- /dev/null +++ b/functions/general.php @@ -0,0 +1,27 @@ +'; + if (is_front_page()) { + $str .= '

'; + } else { + $str .= '
'; + } + $str .= get_bloginfo('title'); + if (is_front_page()) { + $str .= '

'; + } else { + $str .= ''; + } + $str .= ''; + echo $str; +} + +function change_permalinks() { + global $wp_rewrite; + $wp_rewrite->set_permalink_structure('/%category%/%postname%/'); + $wp_rewrite->flush_rules(); +} + +//hooks +add_action('init', 'change_permalinks'); \ No newline at end of file