Create frontend Admin Menu in WordPress

May 23, 2010

Here is a short tutorial on how to create an additional WordPress menu that only shows up if a user is logged in. We can use this technique to create admin front end interface menus for the most used tasks: writing and editing posts and pages, editing the current post , a direct link to the “manage” Section of the WordPress admin Interface etc. This is easily done with the WordPress function current_user_can() As a parameter for the function you just have to add the expected user level and wrap the whole function... [Read the full story]

Insert special characters between wordpress menus items

March 12, 2009

The wp_list_pages function of wordpress is very useful, but sometimes it can be a bit frustrating. For exemple when you want to insert characters as such as “//” between menu items. Happilly, here is the solution to this problem. To do so, simply paste the following code where you want your wordpress menu to be displayed. <?php $char = ' \\ '; wp_list_pages('link_before=<li>&link_after='.$char.'</li>'); ?>  Read More →

Adding A Private Page Into The Navigation menu

January 11, 2009

If you use pages which have the state private, they will not be shown in the navigation. Nevertheless it can make sense to show this specific page in the navigation, if you want to provide easy access to this page for your users. The page should only appear to privileged users for sure. I will show you a little hack, which will let you exactly do this. simply open the file where your navigation is (You can look up for the wp_list_pages() function) and insert this snippets instead of the function: <ul> <?php wp_list_pages('depth=1&title_li=0&sort_column=menu_order'); if(current_user_can('read_private_pages'))... [Read the full story]

Display WordPress Tags in a Drop-Down Menu

September 27, 2008

Tags are useful to any blog: As you know it, they allow the user to display a list of posts related to a subject. Most of the time, tags are displayed with in a tag cloud. If you have 20 different tags, that’s ok, but if you have 100 or more tags your tag cloud will be very hard to read, and no-one will click on it. This is probably why many blogs recently stopped displaying their tag cloud, or put it on a separate page. First, we have to create a php function. Copy and paste the following code in the functions.php file... [Read the full story]

Highlighted Menu in CSS

June 17, 2008

Here is a quick and easy way to make menus with highlighted sub-links. Minimal code for maximum effect. CSS Code #css-target-menu { background: #000; padding: 5px; width: 300px; } #css-target-menu ul { font: 11px “Trebuchet MS”, Verdana, Arial; list-style: none;margin: 0; padding: 0; width: 300px; } #css-target-menu li { background: #000; padding: 2px; } #css-target-menu li:hover { background: #333; } #css-target-menu li ul { width: 224px; } #css-target-menu li ul li a { color: #999; } #css-target-menu li a { color:... [Read the full story]