Archive for the ‘Wordpress’ Category
Disable Admin Bar
Lots of ways to skin this cat, but this is the easiest for wp 3.3+
in functions.php
show_admin_bar(false);
Add a theme options page
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
}
Easy way to add embed code to your site
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.
Great wordpress video for beginners
Here is a little WP video to get beginners familiar with WP admin panel.
Converting single wordpress blog to network ( aka MU )
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
WYSIWYG Editor for your custom box
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');
?>