If you have ever tried to include a shortcode as an example in any of your posts, and said shortcode is active in our blog, we know the nightmare that we face: the shortcode will be executed even when we put it between
error that we make is this: we insert the complete shortcode ignoring (or forgetting) that the person in charge of executing it is PHP code, which processes the shortcode and sends the result, completely ignoring the
it is wrapped in.
The solution is to separate the shortcode, but not with spaces, but with them
. For example:
Basically what we do is separate the shortcode, but instead of using spaces, we use a few
I have read this petition for a long time. I do not know if it was someone in a blog or a forum, but the fact is that what I wanted was that whenever I created a new post it would already include a default text, not from a blank board.
Possible applications ?, many, from the simple signature of the author to not have to enter it manually, going through a code of a banner, still images, whatever. And I do not mean insert text at the end of posts as shown but in your WordPress editor, which appears by default as soon as you open it to write a new entry.
Well, it seems that Justin Tadlock found the same request and has found a solution that, in addition, does not require modifying any file
'core' ((Fixed files of WordPress installation)), but rather you simply have to add a few lines to the file
'functions.php' of our active template (one day you will have to make a monument to this file), the following:
Also this code has a virtue (although any one thinks that it is a failure), and it is that it does not modify any article already created but it will only add the text in the following posts that you create after you save the changes in
Although, at the time of writing this entry, version 2.8 was only 36% complete, it already incorporates many new features, but there are always some that stand out. As usual, an image and a brief explanation:
If you like the way you can organize the WordPress Board, you'll love knowing that version 2.8 will include that same mechanism to organize the widgets: just drag the widget you want to the bar you want and ready. Nothing to select confusing options as before.
A feature that I liked in version 2.6 was that you could preview the theme before activating it, but honestly, it was annoying for those who wanted to activate a theme without having Preview it (for example, if you already knew how the theme was). Well, now things are simplified: we can activate it, see how it is or even delete it, all separately (although if you preview the theme, you can still activate it as in version 2.7)
Those are the innovations already incorporated in version 2.8 , but there is more: among the innovations to incorporate are:
We hope that these features are finally included in WordPress 2.8 because they look tempting. For the rest, we can only wait 🙂
WordPress automatically saves posts at predefined intervals. This new functionality, included in WordPress 2.1 makes every 60 seconds automatically save the post or page you're editing as a draft.
It's a good idea, especially if of disconnection, because you know that your post will not be completely lost, but it is also possible that the default auto-save interval does not adapt to the tastes and needs of all bloggers.
Fortunately, you can change the WordPress autosave time and set your own time limit. To do this you must change the configuration of the constant called
AUTOSAVE_INTERVAL and replace it for as long as you want. This constant can be added to the file
wp-config.php which you already know is in the root folder of your WordPress installation. You just have to add a line similar to this:
In this example we have defined that auto-save the posts and pages every 300 seconds, that is 5 minutes. Of course, you can put it at the time you want.