Publish a WordPress from the Admin Bar in the frontend

Free WordPress plugin to publish posts faster from the front of the site

While the WordPress toolbar—the Admin Bar—provides links to start writing a new post or edit an existing post, it doesn’t provide a link to publish posts.

Let’s see how to extend the WordPress Admin Bar with a free plugin to publish posts from the front of a WordPress site while you’re previewing a post.

The problem with post publishing

I was recently experiencing a situation that wasn’t optimal: I was auditing some posts by previewing them on the front of the WordPress site, and each time I wanted to publish one of them, I had to go to the admin side of WordPress.

I didn’t like that process because it was time consuming: leaving the post view and load the entire WordPress admin just to click a button to publish a post? That’s not efficient. And it’s specially inefficient on a mobile device.

The solution to quickly publish posts

To solve this, I created this WordPress plugin to publish posts from the front of your WordPress site while you’re previewing it. You can download it for free from the WordPress.org repository:

https://wordpress.org/plugins/admin-bar-publish/

Once you install and activate this WordPress plugin you no longer need to go to the WordPress admin area just to publish a post. If an an author sends you a post preview link for your final approval before publishing, you can simply click the button in the Admin bar that the plugin adds and the post will be published.

Publish posts from the front of a WordPress site

You’ll see the URL in the browser change, from the preview URL, to the final URL of the published post using pretty permalinks. You’ll also see that the Publish button will change to read Draft instead. That’s another gem of this plugin that we’ll see in the next section.

Switch published posts to drafts

So you see a live published post and decide that it’s not ok, that it needs to be fixed and it’s better to take it down temporarily. You no longer need to go to the WP Admin to make it a draft: Just click the Draft button in the Admin Bar to quickly remove it from public view. Now you can make the changes needed until you’re ready to make it public and the finally publish it again.

Switch posts to draft from the front of a WordPress site

Get the free plugin!

The Admin Bar Publish plugin for WordPress is completely free so you can head to the WordPress repository to download it, or search for it in your WordPress admin area going to Plugins > Add New and searching “Admin Bar Publish”. Once you locate it, click the Install button and then the Activate button.

The source code is also freely available at Admin Bar Publish at GitHub so feel free to contribute or suggest anything there. The plugin uses the REST API to publish without reloading the page, and the JavaScript is transpiled from a TypeScript source.

Please donate

If you found this useful, feel free to buy me a coffee ☕️so I can stay awake and create more useful plugins for you!

$3.00

Advertisements

Leave a Reply