How to use custom styles in the Word Press post editor
Every-time I created a word press theme, I felt the need to allow my theme users to use on their contents, the CSS styles that I had created to the theme itself.
They were especially created in order to maintain a visual identity between the layout and the contents, and should be directly applied at the author’s will! – How-come the styles, created specially for that theme (my CSS Classes), weren’t available to be applied trough the default WYSIWYG text editor?
My objective was allowing users to be able to apply the custom styles, in the default panel, using the panels own logic, without any particular knowledge of HTML or CSS and without having to stick to the editor’s default predetermined styles.
In this brief tutorial I’ll explain a very simple way to do this, just by adding a couple of lines of code to your theme’s functions.php, and by creating a very simple CSS file to host your custom styles.
In my previous article about this subject (www.wdmac.com/word-press-custom-css-styles-in-the-wysiwyg-editor) we’ve edited a couple of WP core files, and the result was satisfactory. However those edits where lost on every WP upgrade, and that was not satisfactory at all. This is a clean, straightforward technique, that is “permanent” and non-upgrade-dependent.
This article was updated: August 12th, 2010
Updating word-press while mobile (e-mail, MMS)
I was trying to find a way to keep one of my blogs updated while on a two week motorcycle vacation across Europe. I needed an easy, hassle-free, non-expensive way to update small road-side bits of information.
I have several applications that would do it, like:
- Publishing directly via e-mail does not allow images, and needs an extra step checking the email to post.
- Installing a mobile UI
- Adding a custom posting interface, etc. etc.
But all this required a moderate time-consuming mobile connection, and if your are doing it abroad (roaming), by the end of the two week journey you phone bill will be grown quite fat….
What I really needed was something like an SMS, or MMS. E-mails can be sent via MMS with a fixed price. But directly publishing to word-press via email (as i’ve described in my previous article “word press posting via e-mail” ), is a bit limited.
So I’ve done a bit of research and…
Scripts in your Word Press projects
Inserting scripts in your Word Press projects the proper way.
Sometimes you need to to enhance you WP project capabilities (plugins, themes, widgets, whatever), and to do so you need to add some scripts to your WP projects, either your own scripts or someone else’s. There are several ways to do this, and most of them are wrong.
This is a post excerpted from the Word Press Codex explaining how to do it.
Also there is a list with the default script libraries included with your Word Press installation, that you don’t need to include, just call whenever you need!
Cool ah!?
Word Press Role dependent admin-menus
Sometimes we need to give different tasks to different admin-users in our word-press blogs, in order to do so, we need to have some way to give them what we want, and just that. The safest way to do it is the WYSIWYG way, “they will only get what they see”.
This means you will only show them the menus or options they are supposed to act upon. We can achieve this by means of the Word Press roles “user level capabilities”, as was described in the previous article (“Word Press roles and capabilities“), and that will here be put to practice.
Word Press Roles and Capabilities
There are pre determined admin-roles in every word press installation.
This means every registered user can have a specific role, with specific capabilities within the blog.
This capabilities, relate to access levels, and are granted by the blog’s administrators.
This doesn’t mean that a user can’t perform someone-else’s task, it just means it will only be able to do a determined number of tasks, allowed by his user level.
“Every user with an access level can do everything his access level allows, plus all the capabilities of the user levels bellow.”
The Word Press roles and Capabilities hierarchy will be described in this article, along with the allowed admin-tasks for each level or role.
