WordPress (Thesis) Tips

I love WordPress and I use the Thesis Theme for the majority of my sites. Not being a CSS programmer (I dable) I have found some lines of code that can be very useful for setting up your sites.

One of the many cool features of Thesis is the built in editor for custom.css and custom_functions.php

Now if your not a programmer these two files may not mean anything to you. What they do is help you customize your site with additional options for css hence the .css or php .php.

That's as far as I go in teaching programming. What I can show you is that in your Thesis Theme under the Thesis tab there is a custom file editor. Inside the editor is a drop down menu to let you select custom.ss or custom_functions.

Copy and past the following code in your custom.css for some cool additional features.

Evenly align sidebar menus

.menu li { float: none; }

Center align your header image

.custom #header{background-position:center;}

Add a background image to your site

body.custom { background: url(http://whateveryouwant.png) 50% 0 no-repeat; background-attachment: fixed; }

Custom_functions.php

Get rid of Page/Post Names within your page

function suppress_title() {
 return (is_page()) ? false : true;
}
add_filter('thesis_show_headline_area', 'suppress_title');
function my_nav_menu()
{

Center Align Menu

?>
<div id="menuwrap">
<table cellspacing="0" cellpadding="0" style="margin: 0pt auto;">
<tbody><tr><td align="center">
<?php thesis_nav_menu(); ?>
</td></tr></tbody></table>
</div>
<?php
}
remove_action('thesis_hook_before_header', 'thesis_nav_menu');
add_action('thesis_hook_before_header', 'my_nav_menu');
?>

 

Previous post: