Thoughts on programming, web development and design.

Circuit Board

Category: WordPress Page 1 of 3

What you can do to client-proof WordPress

You create a beautiful website for your client. Then, you hand over the website to them. Sometime later, you get a desperate call from them because they did something that made it so the site either doesn’t display or looks horribly messed up and they need your help to fix it. What can you do to make certain that the site you build isn’t easy to break?

Client Proof WordPress

Photo By: Pixel Creatures

User Roles

WordPress has different user roles. Use the different roles based on the clients needs. They don’t need to have full administrator access if they are going to be publishing blog posts and page updates.

No Account for adding posts

Use Gravity Forms to create a form for adding content to the website. You add this option for people who are creating content and don’t need access to the admin section. The website’s editor can approve and release content to be seen by your website visitors.

Hide options on the Admin Menu

Install the plugin Admin Menu Editor. It allows you to hide certain menu items from your clients. The less they have access, the less likely for them to make a mistake that damages the website.

TinyMCE Advanced

Add the TinyMCE Advanced plugin to make editing simpler for your clients. The existing editor may have too many features and make it too easy to break the website. This plugin can help to create an editor that has only the features that they need.

Add Custom Widgets to the Dashboard

Create custom widgets to the dashboard that provide extra help for your clients. You may want to create a help section that provides step by step instructions on how to edit and update their website.

Brennan Bliss gives his tip in his talk at WordCamp Albuquerque 2018.

Summary

When you hand a website over to your client, you want them to be able to maintain it as smoothly as possible. You want to give them a site that is hard to break. By making adjustments to the admin dashboard, restricting the type of user roles they get and using custom widgets and plugins that change how the admin works can help both you and your client have a better experience with the WordPress site that you built.

Resources mentioned in WordCamp Albuquerque 2018 talk

4 Examples of Building with WP API

APIs or application programming interface provide you with a way to integrate services or features with your website. Before APIs, you need to partner with companies in order to use their code in your website or app. You have a WordPress website. Can you use an API to create additional features? With their WP API, you can build solutions unique to your WordPress website.

4 Examples of Building with WP API

What can you do with WP API?

You can use the WP API to build solutions that integrate with WordPress or use it as a back-end database. Maybe you need to create new features that talk to an external API. I found four examples that show you how to use the WP API to integrate with WordPress and an external API for Instagram.

Fetch Random Posts

Chris Coyier demonstrates how to use the WP API to randomly fetch posts from WordPress. In his example, he uses WordPress to store quotes about design and randomly displays one to you.

Screenshot of Quotes On Design Website

Go to Quotes on Design to see the api at work.

Retrieving Posts in C#

What if you want to use the WP API with a different programming language? With WP API, you can use a programming language like C# instead of PHP to retrieve posts from WordPress. Hendrik Bulens chose to use ASP.NET MVC as the front end to retrieve the latest blog posts from WordPress.

Voting for Blog Posts

You spend time writing blog posts and want to allow your readers to vote on whether or not they liked the post. In the past, you need to write a plugin using PHP. You can use WP API to accomplish this. Use this example from Delicious Brains to create your blog voting.

Integrate WordPress with Instagram

If you use Instagram, you may want to include photos from your account. WebDev Studios show you how to use the API to integrate Instagram with WordPress.

Summary

These examples show you how to use WP API to modify WordPress and work with an external API. If you want to learn more, Chris Lema has a guide that contains resources and tutorials on Getting Started with APIs and WordPress. You can also check out Getting Started with using an API.

4 Ways to Add Code Snippets to Your Blog

When you write a blog post that features code, you’ll want to show your code. But, you don’t want it to act like code. What are your choices for adding code to a blog post? You can manually show your code, use a plug-in or embed it into your post. Which one do you choose?

4 Ways to Add Code Snippets to Your Blog

1. Code it manually yourself

Write the code to style it yourself without using a plug-in or hosting your code on another website. You can create a code snippet with HTML and CSS. With the HTML tags <pre> and <code> and CSS, you can style your snippet to work with your design.

Code Snippets in HTML and CSS

2. Use a plug-in

If you prefer not to code it yourself, your next option is to use a plug-in. For WordPress, you can use a plug-in called Code Snippets. With Code Snippet, you can manage your snippets easily.

Code Snippets WordPress Plugin

3. gist.github.com

Don’t want to code it yourself or use a plug-in and you have a github account? You can host your code on gist.github.com. They provide you with a way to embed code snippets on your blog.

gist.github.com

4. CodePen

Are you a CodePenner? If you are and have a self-hosted WordPress blog, you can embed your pens or use the CodePen Plugin. CodePen takes care of the code and formatting for you. Refer to CodePen’s documentation on the best method for you.

CodePen Embed & WordPress Documentation

Summary
Whether you create code snippets with code, use a plugin or host on gist.github.com or CodePen, these methods provide 4 different ways to show your code.

8 Ways to Freshen Up Your Blog

You keep your blog current by writing new blog posts. As you write more posts, you may decide to change the focus of your blog. Or you want to make some minor changes. What can you do to freshen up your blog?

You can tackle it in two ways: maintenance and tweaking your blog.

Freshen Up Your Blog

Maintenance

As you continue to write and create posts for your blog, your website can start to slow down or links no longer work. You should take this time to do some routine maintenance on your blog.

Broken Links

Websites change their links, remove content or go permanently away. You need to check your site for broken links. If you have WordPress, use the Broken Link Checker to find them. If you are using a different CMS, try W3C Link Checker.

Clean up your sidebar

Is your sidebar working for you? Look at the items in your sidebar and decide if you have links, forms or products ads that need to be updated or removed. You may want to replace them with links to recent or popular posts or a signup to your newsletter.

Clean up WordPress

Your WordPress database over time can get messy. You add, edit and delete posts. You manage comments by editing or deleting spam. This can cause your database to become bloated and slow.

After cleaning or optimizing your database, you should update any plugins and themes that you use. Then, delete any plugins you are no longer using.

Tweak Your Blog

By updating your blog with simple changes, you can help to freshen up the content of your posts.

Update Graphics and Photos

Are your photos and graphics working for you? You may want to change them out for higher quality photos. Pick out pictures that work better for your blog and brand. You can use one of the sites mentioned on the The Badass List of Free Stock Photos Websites for Designers or take your own photos.

Add headings to your posts

When you first wrote your posts, you may not have used heading. Headings are a way to organize and highlight important information. They range from H1 to H6. Headings allow you to break up your post into easily readable and scannable chunks.

Add call to actions

You can use clickable buttons to let your readers know what action to take. You may want them to sign up for your newsletter, contact you or buy a product from you. Adding clickable buttons is a great way to get your readers to engage with you.

Add pull quotes

Create a pull quote to jazz up your design and draw your reader’s attention to an important idea. Use these tips to draw your readers attention with pull quotes.

Summary

Regular maintenance helps to keep your blog running smoothly. By changing photos, adding headings, pull quotes and calls to action, you can update old posts and improve your relationship with your readers.

Photo Credit: http://startupstockphotos.com/

5 Places to Get WordPress Snippets

How can you modify your WordPress website? By adding a theme, plugins or modifying WordPress yourself. When you develop your own WordPress websites, you may want to add code instead of relying on a plugin. Adding a code snippet to your theme or a custom plugin can be a better solution than searching for a plugin that does what you want. Where do you find these code snippets, what do you do if it breaks your site and how to do manage them?

5 Places to Get WordPress Snippets

Where do you find code snippets?

WPSNIPP

WPSNIPP – WordPress Snippets has a collection of about 666 snippets. You should be able to find a snippet that works for your next project.

wpsnipp

 

Digging Into WordPress

Digging Into WordPress has tips, tricks and snippets for modifying and making your WordPress site even better. You can use their tips and tutorials to replace plugins that could do the same thing.

Digging Into WordPress

 

WP-Mix

WP-Mix is a mix of code snippets and tutorials. You will find WordPress, PHP, jQuery, HTML, CSS and more.

WP-Mix

 

CSS-Tricks

CSS-Tricks has a collection of WordPress snippets. You can add these snippets to your theme or a site-specific plugin.

CSS-Tricks WordPress Snippets

The Web

You can search the web for a code snippet. Many WordPress or developer blogs will have code snippets that you can use.

What happens when you find one and it breaks your site?

WP Beginner explains how to paste snippets from the web into WordPress and how to avoid mistakes that could take your site down.

What do you do with your code snippets?

Whether you have written or found a WordPress snippet that you want to share, you need a way to do it. Thoriq Firdaus show you how in How to Manage and Use Snippets in WordPress.

Code snippets can make it easier for you to modify WordPress. You can search and paste snippets into your WordPress site. Where and how you paste these snippets can determine whether or not it will fix your problem or crash your website. As with all code you find, read it to make sure you understand what it does and test it. Do you have a place where you can find WordPress code snippets?

Page 1 of 3

Powered by WordPress & Theme by Anders Norén