All Posts Tagged
Tag: ‘theme’

10 Code Snippets For Your WordPress Theme Functions.php File

I’m working with a lot of WordPress based sites and there are some code snippets which I frequently use. I want to share them with you. 1. Prevent Direct File Access # No direct file load if (!empty($_SERVER['SCRIPT_FILENAME']) && 'functions.php' == basename($_SERVER['SCRIPT_FILENAME'])) { die ('He's dead, Jim!'); } Put this code on the top of …

Read More

Tip: Exclude Categories From Archive In WordPress

While working on a recent project, I came across a task: exclude certain categories from the archive page. I went the usual way to the WordPress codex -> query_posts and thought the following would do it: # Exclude categories | archive.php if ( is_home() || is_category('one') || is_category('two') ) { $current_cat = get_query_var( 'cat' ); …

Read More

Include WordPress Author Biographical Info In Posts

In addition to this and this post, I thought this post may be useful for you as well. It describes how you can add the ‘Biographical Info’ to your posts.

Read More

Guest Posts And the_author() In Your WordPress Blog

This post is outdated: I have converted this into a plugin → more info & download As you may have seen I have a guest post on this blog written by Matt from phuketvogue.com. Since I am the only registered writer/author on this site, all posts are marked as ‘written by Toxane’ or something similar. …

Read More

WordPress Themes and the functions.php file

Loads of good free WordPress Themes are out there. And the most of them don’t make use (or at least no good use) of the ‘functions.php‘ file. This is how the WordPress Codex describes the file: A theme can optionally use a functions file, which resides in the theme subdirectory and is named functions.php. This …

Read More