Media Extreme

Development Notes

Archive for the ‘Wordpress’ Category

Disable Admin Bar

without comments

Lots of ways to skin this cat, but this is the easiest for wp 3.3+

in functions.php
show_admin_bar(false);

Written by chuck

December 29th, 2011 at 7:38 pm

Posted in Wordpress

Add a theme options page

without comments

http://codex.wordpress.org/Function_Reference/add_theme_page

function theme_admin_setup() {

add_theme_page(
__( ‘Theme Options’),   // Name of page
__( ‘Theme Options’),   // Label in menu
‘edit_theme_options’,                    // Capability required
‘theme_options’,                         // Menu slug, used to uniquely identify the page
‘theme_options_page’ // Function that renders the options page
);
}

add_action(‘admin_menu’, ‘theme_admin_setup’); // must be wrapped in admin_menu
function theme_options_page() {

if ($_POST) { .. update .. }

// page for the form

}

 

Written by chuck

November 30th, 2011 at 1:18 am

Posted in Wordpress

Easy way to add embed code to your site

without comments

If you want to embed from popular video sites, rather than copying and pasting embed codes, use oembed and the built int wordpress oembed functions.

http://codex.wordpress.org/Function_Reference/wp_oembed_get

Call it from your template and it will create the embed code for you. The only drawback is that it may be slower.

Written by chuck

November 18th, 2011 at 11:06 pm

Posted in Wordpress

Tagged with , ,

Great wordpress video for beginners

without comments

Here is a little WP video to get beginners familiar with WP admin panel.

Written by chuck

November 14th, 2011 at 2:36 pm

Posted in Wordpress

Tagged with , ,

Converting single wordpress blog to network ( aka MU )

without comments

What should be simple took quite a while. There is really only way to do this, and that is from scratch.

1) Create an XML export

2) Rename your install and put it somewhere else

3) Drop the database, create a new one

4) Install WordPress

5) Follow the instructions for network install

6) Import your XML.

7) copy the upload directory from the old instance

Written by chuck

October 18th, 2011 at 6:18 pm

Posted in Wordpress

Tagged with , ,

WYSIWYG Editor for your custom box

without comments

If you have a custom text box in the edit post page, and you want to have the built-in editor, it’s quite easy to do. the_editor($content,'id');
?>

Written by chuck

October 10th, 2011 at 8:29 pm