Archive for the ‘Wordpress’ Category.

WordPress Plugin “Table of Contents Plus”

This is a must have for bloggers who write long structured articles and posts. It automatically adds a table of contents element to a page or post. It bases its contents on headings in the post. Fully configurable. Great benefit! Thanks to the author!

Plugin download page at wordpress.org:
http://wordpress.org/plugins/table-of-contents-plus/

Plugin homepage:
http://dublue.com/plugins/toc/

Code Syntax Highlighting in WordPress: Plugin “SyntaxHighlighter Evolved”

There is a nice plugin for that: “SyntaxHighlighter Evolved”
http://wordpress.org/plugins/syntaxhighlighter/

Some documentation can be found here:
http://en.support.wordpress.com/code/posting-source-code/

Adding a Template to a WordPress Theme

WordPress version: 3.5

Create a php-file in the theme folder, with whatever name you choose. E.g.

MyTemplate.php

The php-file has to contain at least the following code to be recognized as template:

<?php
/*
Template Name: A Nice Template Name
*/
?>

Replace the string “A Nice Template Name” with whatever string by which you want it to be selectable. The string can contain spaces and special characters. The template now will be recognized by WordPress and you can choose it, for example, as template for a new page. The template will be selectable by the name “A Nice Template Name”. It just would not display anything.

Usually a template is aligned with the theme by using the themes header and footer at least.

<?php
/*
Template Name: A Nice Template Name
*/
get_header();

get_footer();
?>