Techniques » Wordpress

Admin Link Shortcode for Thematic Footer Text

Thematic comes with a variety of shortcodes that can be added to the footer text in the Thematic Options. We wanted to add the Admin link to the footer, but there is no predefined Thematic shortcode to do this. This technique shows how to create a custom Admin shortcode for Thematic. It is accomplished with a few lines of code in your Thematic child theme’s functions.php file. You are using a child theme, aren’t you?

First define a new function, we used thmfooter_admin_link(). (more…)

1

Using HTML5 with your Thematic Child Theme

In the interest of keeping our websites “future-proof”, I began investigating using the HTML5 DOCTYPE.

As it turns out, the switch for most WordPress themes will be trivial:

  1. Change the doctype declaration to: <!DOCTYPE html>
  2. Remove the (now defunct) profile="..." attribute from the opening <head> tag.
  3. Remove the unnecessary <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> tag.
  4. Add the <meta charset="utf-8"> tag.

Normally, this would be easily found in the header.php file of your theme. In fact, the default WordPress theme (‘TwentyTen‘ as of WP3) automatically uses the HTML5 doctype declaration.

Thematic, however, uses the traditional “XHTML 1.0 Transitional” doctype (more…)

1

WordPress 3.0 Menu Management

One of the best all-around additions to WordPress 3.0 is custom Menu management. So how do you implement custom menus into your WordPress site? Simply add a few lines of code in your theme’s functions.php file, then add the menus where desired in your theme. Yes, it requires adding php code to your theme’s files, but it’s simple and easy to understand.

First we register the ability for your theme to use custom menus using the add_theme_support() WordPress function. (more…)

0

WordPress Create Custom Roles and Capabilities

So you want to add a custom Role to your WordPress site to add more flexibility when assigning users their role, what do you do? Simply add a role, with a few lines of code in your theme’s functions.php file, using WordPress’ add_role() function, as defined below. (more…)

12

WordPress Role Capability Restriction

So you want to restrict user capabilities of a role on your WordPress site from editing and deleting other user’s pages and posts, but you can’t seem to find an easy-to-use plugin that meets your needs, what do you do? Simply restrict that role, with a few lines of code in your theme’s functions.php file, using WordPress’ get_role() and remove_cap() functions. The example below is how to restrict the author role. (more…)

0

What WordPress plugins do we use?

A list of the WordPress plugins we recommend and use. (more…)

1