One of the latest features of WordPress is the inclusion of post revisions [since about version 2.6 if memory serves me correctly] and whilst I can see the use of it in some instances, personally, I would rather it was not automatically enabled.
Basically, it is an autosave function and I find that it gets in my way rather than helps me in my writing. There is always going to be that instance when i wish it was there I guess, but having not had it in place for so long, i just don’t need it now.
So, how to disable it? It would be nice if there was a tickbox which would allow for this, but unfortunately there isn’t. So it involves a simple piece of code being added to your wp-config.php file.
To do this, you need a text editor [no. not Notepad] and you simply add the following line of code to the file [directly under the other lines of 'define' already in place].
define(‘WP_POST_REVISIONS’, false);
Categories: Bits and Pieces | Tags: admin > code > WordPress Tips
According to the original widget source, a WordPress Widget is:
“…just a silly buzzword we’ve chosen for this sidebar-chopping plug-in we have developed. They could have been called Gadgets or Gizmos or Wizbangs or Whatevers. On the surface, they’re just things you can use to personalize your WordPress site without knowing HTML. Way down deep, they may be something entirely more significant.”
However, this explanation may not make you any the wiser in my opinion. So, what exactly is a widget then? Well, they are really nothing more than a “sidebar addition’ or, an “accessory and they apply to the plugins on your site. The term “sidebar’ can also be a bit loose too, in that many sidebars actually extend to the bottom or footer of a site, so just be aware that they do not always only apply to a left or right sidebar system.
What widgets do though, is make it easy to add “design elements, gadgets, content, images, and more to your WordPress sidebar to personalize your blog without knowing HTML, PHP, or any code. Many WordPress Plugins now come with a Widget version to allow easy addition to the sidebar.” [source]
The downside with widgets is that they can sometimes work against you when you want to lay out the varying elements in your sidebars, and if you do not understand the code, you cannot see where they are applied. Take this site for example – there is a mix of widgets and code in place within the sidebar. Mainly code in the right hand sidebar and mainly widgets within the left sidebar. The trouble arises when you want to include some code of your own between the widgets code. But fear not. The easy way around this is to use the Text Widget which can incorporate code itself and therefore make it possible to add whatever you wish between whatever widgets you have in play…
Categories: Bits and Pieces | Tags: code > widgets
One of the things I really miss when trying out new themes is that many do not include an Edit Post Link function. ‘And what is that exactly’, I hear you ask? Well it’s nothing too special but it is almost an essential. You see, without it, whenever you make a mistake in a post [or just want to make some changes] and need to go back in and edit it, you have to log in to your admin panel, find the post you want to edit and then go about the business. Not super hard of course, but just that little bit annoying in a world where we all try to find the easiest [least-clickable] option.
So, to add a link to your posts which will only show to your eyes [once you are logged in and have not logged out that is], you just need to add a small bit of code wherever you would like to be able to ‘click and edit’.
The Codex spells this out succinctly and for the easiest way to implement this, all you need to do is add
usually within the surrounds of the post itself, such as next to the meta, comments or at the end of the post content/excerpt. This will provide you with a simple link with the word ‘edit; which allows you immediate access to the post and saves onthe login -admin panel – find the post procedure as outlined previously.
If you have more than one writer on your site but would like to restrict the edit function to a particular level, i.e. admin, then this excellent code may be the way to go as well.
Categories: Bits and Pieces | Tags: admin > code > edit