How to use custom styles in the WordPress post editor Published on July 27, 2010

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: November 3th, 2011

How to create a .po language translation Published on April 13, 2010

This article is about creating language translations for word press developments, both for plugins and themes.

However, the described .po creation method using poedit is “roughly” universal, thus this post can be used as an universal tutorial about creating .po library (catalog) files for any purpose, not just WP

I found there is a lot information on the web about editing .po files but very little about creating your own .po from start. This was the main purpose of this article.

Scripts in your Word Press projects Published on March 17, 2010

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!?

Semantic meaningful names in html elements. Published on March 10, 2010

“When coding a webpage layout, one tends to organize the html elements, naming them by their present location or purpose. Ignoring that, in the future, that organization can make no sense at all.”

Lets say you’re coding a three column layout with a header and a footer. You will use two columns as sidebars and the third as the central to hold the content.

Naturally you would name your columns with some semantic significant names, like “Left Column”, “Central Column”, “Right Column”, “Header” or “Footer. Probably something like that, right?

Ok, fair enough, these “location” names will definitely help you to organize your content trough the layout development. But what will happen if a couple of months later you decide to refresh your layout and move things around?

Word Press Role dependent admin-menus Published on March 8, 2010

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.

Advertising
Navigation
Recent Posts
Recent Comments
Royalty Free Images
Stock Images
Search Royalty Free stock images on Dreamstime
Resources
Goodies & Infos
Earn Extra Money!

Get an extra income with your vacation photos!

TIP: go to Shutterstock, submit your photos and make an extra income every month. - I do!

MAC

 

Categories

 

External Resources
Twitter Updates
    © 2010 - WDMAC A Blog about Web Design & Development. WordPress development. Tutorials - "Proudly powered by WordPress!"