Don’t really know what Flexbox is, but get the idea it’s going to be (is?) super awesome or important? Chris Coyier gives a great rundown in easy-to-understand (read: not W3C spec) language.
Category: Tips and Tricks
Stop fighting with CSS widths involving padding and borders
A year-and-a-half ago, Paul Irish wrote about the box-sizing
property, and how one particular value could give you your life back (my words, not his).
If you’re not using it yet, start; then you can go back to spending time on IE8.
Read the article: * { Box-sizing: Border-box } FTW
Create Presentations Easily on WordPress.com with Shortcodes
Christmas has came early for me.
On WordPress.com, you can use a number of shortcodes to embed features and create objects with little effort, and make your site look just the way you want. We’re excited to announce new shortcodes you can use to whip up a slideshow presentation — and display it on your WordPress.com site.
A sampling of features
- Selecting different slide transitions (up, down, left, right)
- Rotating and scaling slides
- Choosing colors or images for backgrounds (HTML color, image URL)
- Setting transition durations and sizes
You can see these features in action, along with shortcode instructions to get you started, in the sample presentation below. Don’t forget to view it in full-screen — just click the four-arrow icon on the bottom right corner.
We’re excited that you can use these shortcodes to create presentations, from simple slideshows to sleek, professional presentations. For more detailed steps, visit the presentations shortcode support page.
Other…
View original post 35 more words
Adding a sub-menu indicator to parent menu items
It’s very handy from a UI perspective to indicate which menu items have a sub-menu beneath them (often a small triangle or arrow is used). When using wp_nav_menu()
, WordPress adds the “sub-menu” class to the <ul>
tag of any sub-menus, but nothing to the parent list item; this makes them difficult to target.
Continue reading Adding a sub-menu indicator to parent menu items
Using XML to define translatable strings in WPML
WPML, a plugin for handling multilingual content in WordPress, has the ability to read an XML file for its configuration. In this language configuration file, we can define which custom fields, custom post types, taxonomies and admin texts we want translatable in our theme.
Continue reading Using XML to define translatable strings in WPML
Error establishing a database connection
WordPress generates its pages on-the-fly, pulling information from a database. If you request a web page and the server is having a hard time talking to the database, it will sometimes display “Error establishing a database connection”.
I’ve seen this most often on less-expensive hosting accounts; almost every time it was a GoDaddy account (one reason why I rarely recommend them).
What can you do about it? Just refresh the page; often it’s only a temporary spike that goes away. If the issue remains, you may have a genuine problem and should speak to your WordPress professional.
If you’re on GoDaddy? Call their support at (480) 505-8877 and make sure your current plan is the best thing for you. You can also consider upgrading/cross-grading to one of their WordPress-specific hosting plans, often at no additional cost.
Cleaning up URLs
Why do some of my page links have extra numbers, like “mywebsite.com/about-2?”
The “-2” is caused by creating pages or posts with the same title. WordPress needs a unique name (called the “slug”) for every post, which it creates, by default, from the post’s title. If another post is created with the same title, WordPress will add an increasing number to the end of its slug to keep the posts distinct from each other in the database.
For example, working on your About page, you decide to make another version. When you title the second post “About”, the same as the first post, WordPress will quietly give it the slug of “about-2” (seen in the post editor as “Permalink”, just below the title).
Of course, you can use the Edit button to change the slug to whatever you want, including simply “about” (slugs are always lowercase and alphanumeric, with only underscores or hyphens as special characters).
It won’t let me change it to just “about”.
You have to get rid of the other post named “about” to let the newer post have that slug.
But I’ve already trashed the first version, and it still won’t let me change it.
You have to empty the trash to truly free up that slug. A post in the trash is still in the database (which is how we can restore it at another time if we so choose). Emptying the trash permanently removes that post from the database, and frees up the desired slug.
Clean URLS are an important part of effective SEO (search engine optimization) and make your links as simple and memorable as possible for your users. Clean ’em up!