Techniques » PHP

Simplify the WordPress Admin sidebar navigation

Want to remove some of the root WordPress Admin sidebar navigation? We have a client that was mainly interested in writing pages and managing media for those pages, they were not going to use Posts, Comments or Links in the administration area. We set them up as Editors on a WordPress Multisite installation, below is how we removed those items from appearing in the navigation.

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

2

Redefine Twenty Ten header image width and height

How do you go about redefining the WordPress Twenty Ten header image width and height? We recently used the Twenty Ten theme as a Parent Theme for a multi-site installation for a client. We wanted to retain the use of the custom header image, but wanted a different image width and height. It is accomplished with a few lines of code in the Twenty Ten child theme’s functions.php file. You are using a child theme, aren’t you?

The answer to this one is just so simple (more…)

1

Remove default WordPress Twenty Ten header images

How do you remove those pesky default header images included in the Twenty Ten WordPress theme. We recently used the Twenty Ten theme as a Parent Theme for a multi-site installation for a client. We wanted to retain the use of the custom header image, but didn’t want the default header images to be visible. It is accomplished with a few lines of code in the Twenty Ten child theme’s functions.php file. You are using a child theme, aren’t you?

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

3

Remove Widgets from Twenty Ten WordPress theme

So you want to remove some of the “stock” Widget Areas from the WordPress Twenty Ten theme, how do you go about doing this? We will be using the WordPress function unregister_sidebar(). It is accomplished with a few lines of code in your Twenty Ten child theme’s functions.php file. You are using a child theme, aren’t you?

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

6

Serve Watermarked Images with PHP

So you want to watermark your images, how do you do this? In this technique we’ll show you how we serve our images with a watermark using PHP. We’ll be building on the Serve Resized Images with PHP tutorial we published previously, which explains basic re-size manipulation of your images.

Stepping through the code, we first get our previously created watermark (more…)

0

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