Jan Alexander is one helluva massage therapist in Fort Collins, CO. Jan Baby, as I affectionately refer to her is also my wife! When it came time to develop a website for her new massage business I turned to the latest and greatest CSS3 HTML5 powered WordPress theme.
TLC Medical Massage (TLCMM) is packed with information. Interestingly, the one page that keeps clients coming back is Jan’s Schedule Online page. Jan signed up a paid account with Acuity Scheduling and it has really paid off. Jan found out her clients would rather book online than have to try to catch Jan by phone. Being extremely busy, generally booked at over 80%, it is difficult to reach her by phone.
In your WordPress theme folder, you will always find functions.php, the most useful theme file. The name says it all, this file adds functions to your WordPress website and goes a long way to making the cool stuff happen. Often unknown to many WordPress developers is the fact that this files functions can be moved to a WordPress plugin.
Themes and Functions
Today, theme developers cram all kinds of functions into the theme itself in an effort to woo customers. Whether it is a slider, social media icons and functions, Google analytics and or a spiffy wiz-bang contact form; what happens should one choose to swap out one theme for another. You lose all your hard work setting up those mods. Do yourself a favor. Instead of adding the code to your theme, or relying on the code that is in the theme, instead drop it in a plugin. Flashy Functionality plugin is just one solution. There are plenty available plugins on wordpress.org that will enable you to accomplish many things. Unfortunately, there are those that bring unneeded or unwanted bloat that your site can do without. With my Flashy Functionality plugin, you’ll only have to add it once and your functions will be preserved when you change the design of your website.
Don’t Lose Your Edits
WordPress themes often have updates to keep them playing nicely with core wordpress files and server scripting. With the Flashy Functionality plugin, you can add your new functions into the plugin instead of touching your themes functions file. If you are a power user, chances are you will have a bevy of functions that you use over and over again. Edit the Flashy Functionality plugin to add your favorite and essential functions then upload and activate.
There are many functions that, in my opinion, every WordPress website needs. Here are the functions I’ve pre-loaded into my plugin:
Helpful Info Dashboard Widget
The whole idea of a WordPress website is the client will be able to manage his or her own content. With my Helpful Info Dashboard Widget, I provide the new client with general information on managing a WordPress website, as well as links to great tutorial resources, stock image resources, and my email and phone number when it comes to support. I’ve even built in the ability for us developers to upload “how to” videos and provide them right on the dashboard.
Clear All | The WordPress page/post editor is a great tool to be sure, but don’t we all find those time when the content just won’t behave. I have found myself putting in hard returns, and line breaks in an effort to get content not to jumble together haphazardly; all to no avail. With this plugin, content editors can use the shortcode [ br ] (remove spaces for actual use) thereby forcing the next line of content to clear all other elements.
Private | Display secret message to editors by using my Private shortcode. Usage:
[ private ]Your secret message here. [ /private ] You can provide helpful hints and tips to content admins and editors that only they can see.
Security | There are many functions that can be utilized to protect your WordPress installation from hackers. Consider the functions “explain_less_login_issues”, “disable_file_edit” and or “no_generator”. Other ideas (though not included) are enabling the WordPress hidden admin feature, modify the login logo and image urls and hide WordPess update notifications from all but the admin users. There are plenty more you can use. Check the links at the bottom of this article to get you going.
Core Updates | Select how you want WordPress to perform updates. More Info»
Misc. | Add additional menu and or widget areas and more. You’ll have to download the plugin and look inside to see them all.
Recently I ran into a road block when working on a website where I needed to take the names of gourmet chef’s, add them as the page title, then display them split onto two lines. I thought CSS word-break might bail me out, but no joy; was not working for my situation. I then Googled for solutions and found a StackOverflow post that suggested CSS word-spacing. That failed miserably as well. The solutions was to code a WordPress function then apply it to where I was echoing out the titles.
Disabling Comments Globally :: Have you been getting tons of comment spam, those pesky comments that talk more abut Gucci bags than the do about any of your website or blog subjects? Did you know that commenting ability can be disabled (or hidden or turned off, however you wanna couch it). Here is a quick tutorial about managing comments for WordPress websites and or blogs, either globally or on a per page and or per post basis.
Comment management in WordPress is is not theme related – turning off comments is a WordPress feature that is just a bit hidden at first and not very well documented. It will work no matter what theme you’re using.
Disable WordPress Commenting Globally
Navigate to your website or blogs admin; the WordPress Dashboard, next in the left navigation panel find Settings =>Discussion . Find the option on the ensuing scree “Allow people to post comments on new articles”. This setting is checked by default. You can un-check this option to turn off entirely; well, with some noted exceptions.
Posts and or pages that have already been written before the time you change this option will remain unaffected.
Spam Bots that find your website theme’s comment form and auto submit it even though it has been hidden from public view.
Turn Off Comments for Already Published Pages/Posts
Using Quick Edit
By displaying the list of pages or posts, one can easily use quick edit to change the WordPress commenting behavior on a per page/post basis.
More advanced users can globally effect all pages and posts that you do not want comments or pings / trackbacks displaying by using SQL via phpMyAdmin or other database modification tool.
Below are the simple SQL commands to disable comments, pings / trackbacks across an entire WordPress site.
Disabling Pings and Trackbacks
The SQL commands below changes the “ping_status” field of published posts & pages to “closed”. Notice that there is a separate SQL statement for each post type. If you had custom post types you would need to issue SQL commands for each post type by changing the “post_type” variable to the applicable custom post type.
UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'post';
UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'page';
The SQL commands below changes the “comment_status” field of published posts & pages to “closed”. This is similar to the SQL statement above for disabling pings / trackbacks in that you will need to issue the SQL command for both the post and page post type plus any other custom post types you have defined.
UPDATE wp_posts SET comment_status='closed' WHERE post_status = 'publish' AND post_type = 'post';
UPDATE wp_posts SET comment_status='closed' WHERE post_status = 'publish' AND post_type = 'page';
With four simple SQL queries you can disable comment, pings, and trackbacks across your entire WordPress site.
Find Attachment Comments
If you find your media file attachments are being targeted by spam comments then here is the solution for you.
But most of you probably want greater power. You want micromanagement. You wanna choose one by one the pages or posts that have comments enabled. Well, that’s very easy. The option has been there all along, only that it’s not visible. Yet…
Either create a a new post or page, or edit an existing one and then, in the top right corner of your page look for the Screen Options tab. Click on it to reveal a host of hidden options. The option related to WordPress discussion/commenting is titled “Discussion” and it is not enabled by default. Enable this option and then below the page/post content editor a new meta box will be revealed as pictured below:
Un-checking the Allow Comments check box will turn off commenting – hide the Add a Comment form for individual pages or posts.
A Plugin Solution
While I often caution about excessive plugin use, if you are not an offender you may want to go this route. Please be aware that any plugin may conflict with your theme’s code or with other plugins, now or in the future given WordPress core and plugin updates that are sure to occur.
The Disable Comments plugin will allow a site administrator to globally disable all comments, including pingbacks and trackbacksLear more from the WordPress codex. Comments can be disabled for specific post types only – posts, pages, or attachment pages. The plugin’s effects are reversible simply by disabling the checked options.
The latest version of WordPress, “Oscar” (or version 3.6 to the less romantic) was released just over a week ago. By now a huge chunk of active WordPress users will have migrated to the latest / greatest version of WordPress. (3.6.1 as of this writing)
This new Oscar version was named in honor of Canadian jazz pianist and composer Oscar Peterson, WordPress 3.6 features more than just a new theme and improved revisions. Oscar includes better auto-save and post locking, native support for audio and video embeds via an HTML5 media player, as well as improved integration with Spotify, Rdio, and SoundCloud.
The newly added user features are as follows:
The new Twenty Thirteen theme puts focus on your content with a colorful, single-column design made for media-rich blogging.
Revamped Revisions save every change and the new interface allows you to scroll easily through changes to see line-by-line who changed what and when.
Post Locking and Augmented Autosave will especially be a boon to sites where more than a single author is working on a post. Each author now has their own autosave stream, which stores things locally as well as on the server (much harder to lose something) and there’s an interface for taking over editing of a post.
Built-in HTML5 media player for native audio and video embeds with no reliance on external services.
The Menu Editor is now much easier to understand and use.
A new audio/video API gives you access to metadata like ID3 tags.
You can now choose HTML5 markup for things like comment and search forms, and comment lists.
Better filters for how revisions work, so you can store a different amount of history for different post types.
MP3 for audio and MP4 for video are pretty standard but the MediaElement.js player supports all of these file types.
Keep in mind that video files are often very large in size. It is usually recommended that you host video on a service like YouTube or Vimeo since their servers are optimized for streaming video. It will also save you the cost of disk space and bandwidth. See Embedding from Other Sites below.
Smartly, you uploaded an audio or video file to another server, say Amazon S3 or a file hosting service. In that case, you can’t use the process above. Instead, simply provide the URL to the file in your content. WordPress will read its extension (.mp3, for example) then automatically show the media player. Just enter the URL to your media file (unlinked) on a line of its own. Keep in mind that video files are often very large in size. It is usually recommended that you host video on a service like YouTube or Vimeo since their servers are optimized for streaming video. It will also save you the cost of disk space and bandwidth. See Embedding from Other Sites below.
Smartly Use Video URL
Maybe you uploaded an audio or video file to another server, say Amazon S3 or a file hosting service. In that case, you can’t use the process above. Instead, simply provide the URL to the file in your content. WordPress will read its extension (.mp3, for example) then automatically show the media player. Just enter the URL to your media file (unlinked) on a line of its own. Consider this a bonus. You might also want to embed a video from a site like YouTube. This has been possible before WordPress 3.6 with a very handy feature called Embeds. It’s not new, but I find many users are completely unaware of it and struggle at copying/pasting blocks of HTML embed code, which often requires the help of a plugin. That’s too much work! Instead, just paste the URL of the page showing the video.
MediaElement’s great, but we don’t want to be locked in to one external library forever. Instead of using MediaElement-specific markup everywhere, we expose audio and video markup through shortcodes: [ audio ]and [ video ].
For the following scenarios:
I have an old post that has a video in the Media Library attached to it, and I want to use the new shortcode:
I have the URL for a video, from the Media Library or external, that I want to play: [ video src="video-source.mp4" ]
I have a source URL and fallbacks for other HTML5-supported filetypes: [ video width="600" height="480" mp4="source.mp4" ogv="source.ogv" webm="source.webm" ]
Same goes for audio:
I have an old post that has an audio file in the Media Library attached to it, and I want to use the new shortcode:
I have the URL for an MP3, from the Media Library or external, that I want to play: [ audio src="audio-source.mp3" ]
I have a source URL and fallbacks for other HTML5-supported filetypes: [ audio mp3="source.mp3" ogg="source.ogg" wav="source.wav" ]
Shortcodes focus on the “what” and abstract the “how.” If you want to use a library that is not MediaElement, you can! Just look at what to filter: here
Example :: There is a YouTube video at http://www.youtube.com/watch?v=mmRPSoDrrFU that you want to embed. Simply paste that into your content on a line of its own and the YouTube player will show in its place when you publish. Be sure that the URL is not linked.
A photo gallery or slide show can be a source of eye candy and or a functional addition to any WordPress website where grabbing and holding a website visitors attention is the order of the day. Whether one’s website is e-Commerce oriented or primarily informational; any website will benefit from well presented and optimized images. Did you know your websites’ images can help with your overall SEO?
Skilled WordPress developers have created a large number of photo gallery plugins which can be found for sale on websites such as CodeCanyon. Before you spend your hard earned $$$, consider the built in WordPress tools to add an image gallery to any of your posts or pages.
Adding a Photo Gallery – Must See Video!
For Profession Photo Gallery Display Results
Professional images are a best bet when it comes to giving your website a professional look and feel. The internet today if rife with resources where one can discover and download high quality images, many of them for free.
Stock Photo Resources
Where to Get Images
For Adding Images to Posts, Pages, Headers, Backgrounds and Featured Sliders :: The best course of action is to purchase quality stock photography from online stock houses. I have an account at http://istockphoto.com and recommend them highly. Photos for web use cost about two to ten dollars, depending upon the quality and or the photographer.
Recommended sizes vary with a users WordPress theme and overall site design. Here are some guidelines. Note, all sizes are in pixels.
Featured Sliders – 960 X 370
Header – 960 X 325
Illustrating Content on Posts/Pages: 250 X 250
Learn more about WordPress image use and functions:
Often times one must use ones own photographs. Typically, these ‘snapshots’ need a lot of post processing. We professional more often than not use Photoshop. Unfortunately for most this is too expensive of a solution. Do not despair, there are options you can avail yourself of.
Edit Your Photos Online :: This is how one can size ones images to appropriate web specs.
Desktop Photo Re-Sizing :: Great for heavy users or those that just hate doing things online. There are many programs that will run on a Mac or PC and allow one to manipulate photos in a variety of ways.
Former photographer, now WordPress aficionado and website developer - spending most days working feverishly, passionately and relentlessly from a Fort Collins, Colorado basement; occasionally accompanied by Jan Baby (the wife), Zac (eldest son), Max (humorous son) and or Molly the dog.
Lunch is at noon, quitting time depends on whether or not I'm skipping out for a drop-in or stick & puck session; hockey eh?!
Friendly to a fault, chatty and wannabe humorous, generally a helpful kinda guy. Poke Flash Buddy on Skype (flashhq) or send a message.
Download my page's html and inspect how I have implemented my various shortcodes.