Plugins – Page 2 – closingtags </>
Categories
Plugins Themes WordPress

Custom Admin Toolbar in WordPress

I spend a lot of time on StackOverflow, as most people in any programming field do. Well, when I get time, I like to try and answer questions to give back to the community. Sometimes, I can be helpful. Not always, but sometimes.
Yesterday was one of those days. A question came up, about creating a custom interface with the WordPress admin bar. Seeing as how I’d never tried this, I thought I’d give it a shot and figure it out.

After being sidetracked by actual work, I finally got to work on the question and came up with a solution.
add_action(‘wp_before_admin_bar_render’, ‘change_admin_bar’,999);

function change_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->remove_node(‘edit’)

$args = array(
‘id’ => ‘edit’,
‘title’ => ‘Edit Backend’,
‘href’ => get_edit_post_link(),
);

$wp_admin_bar->add_node($args);
}
This code, when placed in the functions.php file of your theme, will remove the ‘Edit Post’ button from the admin bar, and then replace it with a button labeled ‘Edit Backend.’ It’s a super simple piece of code and there’s tons more that can be done with this kind of thing. You can tweak your admin toolbar to your heart’s content.
If you’re looking to do more than this, you can always go to the Codex to get more info or here.
Oh! And this is the link to Stack Overflow thread.

I don’t get to be useful on that website too often as there are so many brilliant minds, it’s easy to get cluttered.

Categories
Plugins Themes WordPress

What is WordPress?

WordPress. You’ve heard about it but you’re not entirely sure what it is. You’ve seen it online while searching for an easy way to setup a website for your business. Well, this is what WordPress is: a Content Management System (CMS).
What is a CMS?
A Content Management System is a platform that is designed to make handling a website easier. They can vary in how they work, but the general idea is that it gives the website owner a simple and easy way to update the website without a lot of technical knowledge. The owner simply logs in to the admin interface of the CMS, clicks a few menu items, and makes the appropriate changes. Simple as that. So where does WordPress fit in?
WordPress is quite possibly the most popular CMS available. This means that it has a large, supportive community. It also has the added benefit of many easy to use features because of this community.
Plugins
If there’s a feature your website needs, and you’re not sure how to program, it’s not a problem. Someone else has probably already thought of it and done it. With WordPress, you can simply install plugins created by developers. Plugins have been created for just about anything you can imagine. Features range from sharing blog posts to Facebook and Twitter all the way to keeping your site as secure as possible. Plugins are there to make your life simple and they can be installed and setup with a few simple clicks.
The Blog
The blog is actually where WordPress got it’s start. It was developed as a blogging platform in 2003 but it’s become so much more than that since then. Now, it’s a CMS, but the blogging features still remain. Publishing a new post to your blog is just as simple as a few clicks and it allows any company to keep their website up-to-date with the latest information. There is nothing more infuriating for as a potential customer than seeing a website that hasn’t been updated in years. By using the blog, you can keep your customers (and potential customers) informed about what’s been going on lately.
Themes
Themes are another huge part of WordPress. They allow you to change the entire look and feel of your website in a matter of minutes. Themes can be downloaded from a number of sites including themeforest.net, wordpress.org, and even from the theme’s creators’ sites. Some of the most popular themes are free while some other less widely used (but higher end) themes are pay-to-use. The advantage of paying for a theme is that fewer other website will be using that same theme, you’re likely to get many more customization options, and you’re supporting a developer’s work.
But what if you can’t find the style you’re looking for in a theme? Just because you can’t find the look of your site in a theme, doesn’t mean it can’t be done. Many people (including myself) develop websites exclusively on top of WordPress. This allows you to have complete control over what is put onto your website. By hiring a developer, or building your website with an underlying WordPress framework, you can take advantage of WordPress’s powerful back-end while controlling exactly how your site is designed and laid out.
Security
You may have heard about security flaws within WordPress itself, most recently, the 160,000 websites that were exploited to attack other sites. Some people claim that WordPress is more vulnerable to attacks than other platforms but their reasoning doesn’t quite hold water. Because WordPress is the largest and most widely used CMS available today, it stands to reason that anyone wanting to attack some websites, would go after instead of the smaller, lesser known sites. Take Microsoft’s Windows OS for an example. Why do so many Windows computers get viruses and not Apples? The chances of an attack being more successful on that platform are much higher, because it is so much more abundant. But Mac computers aren’t invincible either. So this same logic applies to websites as well. What it all comes down to, is being smart about keeping your website safe. After all, your wallet, bank account information, social security number, etc are all only as safe as you make them. By keeping your WordPress site up-to-date, not installing suspicious plugins, and being smart about your passwords, you can keep your WordPress site just as safe as any other site.
So now you know just enough about WordPress to be dangerous. There are infinitely many more resources out there and this blog is still young. For some ideas on how to get a quick site setup, you can check out wordpress.com or wordpress.org

Categories
Plugins WordPress

Edit Hopper

The purpose of this plugin is to allow WordPress admin’s to more easily navigate through child and parent pages. This plugin will create a widget in the WordPress admin interface on a Page Edit screen. It will show any child or parent pages and allow you to navigate to those pages by simply clicking the link for that page. The .zip can be downloaded here. Similarly, you can take the following code and copy it into your theme’s functions.php file.
function edit_hopper_main(){
echo “<div class=’ultimate-container’>”;
echo “<div class=’hopper-title’><strong>Click a page to go to the edit page</strong></div></br>”;

$current = get_post($id);
$parvar = $current->post_parent;
if($parvar) {
echo “<div class=’hopper-parent-link’><a href='” . get_edit_post_link( $parvar) . “‘>”
. get_post($parvar)->post_title . “</a></div>”;
}

echo “<div class=’hopper-current-link’>”.get_post( $id)->post_title. “</div>”;
$args = array(
‘post_type’ => ‘page’,
‘child_of’ => (get_post($id)->ID));
$children = get_pages($args);
if($children)
{
foreach ($children as $child) {
echo “<div class=’hopper-child-link’><a href='” . get_edit_post_link($child->ID) . “‘>”
. get_post($child->ID)->post_title . “</a></div>”;
}
}

echo “</div>”;
}

function edit_hopper_custom_box() {
$screens = array( ‘post’, ‘page’ );

foreach ( $screens as $screen ) {

add_meta_box(
‘edit_hopper_box’,
__( ‘Edit Screen Page Hopper’, ‘edit_hopper_textdomain’ ),
‘edit_hopper_main’,
$screen
);
}
}
add_action( ‘add_meta_boxes’, ‘edit_hopper_custom_box’ );

?>