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?

How is a WordPress Plugin Reviewed?

You created a WordPress plugin and submitted it to the Plugin Repository. What happens when you submit your plugin for review? How does WordPress review plugins?

How does WordPress Review Your Plugin

Mika Epstein at WordCamp Atlanta 2016 explains the process.

How do you prevent your plugin from being rejected?

  • Give your plugin a unique name. Don’t use “plugin” or “WordPress” in the name.
  • Avoid using Trademarks. Company or product names may be trademark. If you want to use Google Analytics as part of your name, you can’t because it is trademarked.
  • Don’t steal another developer’s plugin and pass it off as your own. If you are modifying or forking another plugin, credit the owner of the original and change the code so they can see that you made changes to it.
  • Make sure your code does things the way WordPress expects. They may reject your code if you don’t sanitize your data, hard code calls to WordPress directories or don’t document that your plugin uses calls to third party api’s or plugins.
  • Seven Day Rule. Communicating with your plugin reviewer is key. They may reject your plugin if you don’t respond to your reviewer after seven days.

Reviewing your plugin can be a long process. Every plugin is reviewed by a live person; it is not automated. Working closely with your plugin reviewer, helps you to fix problems and get through the process more quickly. Remember, they actually read the code and test it to make sure it works. You can make your chances of being accepted by doing the following: use a unique name, avoid using trademarks, give credit to others when you use their code and review your code to make sure it does things the way WordPress expects.

Designing Your Process (For Fun and Profit)

What is design? Design solves problems. If you aren’t solving a problem, than your design is making it pretty. Whether it is a website, an app or service, your design must do something. Pretty is not the goal of design.

How do you go from pretty to design?

  • Understand your clients needs. Whether its an app, service or website, work with them to learn what they want.
  • Know who the audience you are designing for. Who are they? What problem to they need solved? Why would they use your solution?
  • Define the problem. What is the problem that you want to solve?
  • Solve the problem. Develop the solution to your problem.

In order to do this, you need to develop a process that help you get from idea to solution. Chris Ford at WordCamp Orange County 2016, talks about Designing Your Process.

You can also find the presentation slides on Slide Deck.

By developing a design process, you can see where you are going, choose the right tools and deal with unexpected surprises and failures when they occur. What have you included in your design process?

How Do I Manage Multiple WordPress Websites?

When you have a single WordPress website, managing it is easy. You log in update plugins, WordPress or your theme. Once you start making more WordPress websites whether for yourself or clients, you’ll need a more effective way of managing them.

Manage Multiple Sites

With WordPress, you have a number of solutions to choice from that help you manage multiple WordPress websites from one location. No more logging in and out and switching between websites. Here is a quick overview of three of the best WordPress Management solutions.

MainWP

A WordPress Management plugin that allows to manage multiple WordPress sites from one location. You can manage your day to day WordPress tasks from posts to updates. MainWP is a free plugin with many features.

You can:

  • Manage Plugins and Themes
  • Manage Unlimited WordPress sites
  • Manage Users
  • Host on Your Own Server
  • Manage content, upgrades and backups

What do you get with the paid version?

  • Article Uploader
  • Advance Uptime Monitor
  • Bulk Settings Manager

Infinite WP

A self-hosted, multiple WordPress management platform that simplifies your WordPress management tasks. You can backup and update multiple WordPress sites from one location without having to login to each site.

  • Written in PHP; not native to WordPress
  • Free
  • Self-hosted
  • Master Login
  • One Click Update
  • Back Up and Restore
  • Doesn’t matter what server you install it on

What do you get in the paid version?

  • Scheduled Backups
  • Manage Users
  • Publish Posts and Pages
  • Security Plugins like WordFence and iThemes Security
  • WP Maintenance
  • Cloud Backup
  • Staging

CMS Commander

A powerful dashboard that allow you to manage all of your WordPress websites in one solution. CMS Commander also provides tools for bulk posts articles and pages to your blogs simultaneously, create a new WordPress site with all the settings that you need to get started and more.

  • Free to try
  • One Dashboard to Control All WordPress Websites
  • Full Overview of Traffic and Statistics
  • Copy Entire WordPress Sites for a New Project
  • Complete Control to Manage Posts, Comments and Users
  • Easy to Update All WordPress Sites
  • Automatic Backups of All Your Sites

Summary

Managing multiple WordPress websites individually is both time-consuming and unproductive. By using a WordPress management tool, you can be more productive by streamlining your maintenance tasks and save time. Each tool has different features, benefits and pricing. Pick the one that fits your needs.

Building a theme based on a photo

Where do you get ideas for a theme? Do you start with a color palette, photo or website? I decided to use a photo to create a theme for my blog. I found a free stock photo and started design my new theme.

cropped-CurcuitBoard.jpg

How Did I Create the Theme?

  • Found a free stock photo
  • Generated a color palette from the photo
  • Start with an HTML Theme
  • Build the Theme in WordPress
  • Test and fix issues
  • Upload and apply the final theme

Generate Color Palette from Photo

I uses Adobe Kuler, now called Adobe Color CC, to create my palette. Here is my palette:

Curiosita Labs Color Palette Choices

Start with an HTML Theme

Using the color palette, I choose a color for the background, heading and more. Next, I built a test page in HTML. HTML makes it quick and easier to design in the browser. You can see your results quickly.

Test Theme In HTML

Once I had the page made, I evaluated the results. Do the colors look good together? Does the overall design do what I want it to do? I had some issues with the colors. They didn’t work well together. I changed out the colors and reevaluated the results. Once I got a design that worked, I started building the theme.

Building the theme

WordPress has starter themes. I wanted a theme that was responsive and simple to work with. At a WordPress meetup, they talked about using Underscores. This starter theme is recommended by local WordPress designers.

Next, I started adding my CSS to the starter theme’s CSS. I had to make adjustments to ensure that the CSS works with WordPress. If you don’t, your theme may have unexpected results. Then, I added my theme to WordPress and started testing. I had to make additional changes. A few tweaks to fix things that didn’t work that way I had planned.

What was the Result?

The result was ok. I went back to tweak the colors because the original colors didn’t work well for me. Working with colors from that photo was challenging. The colors work well in the photo. When interpreted to hex colors for CSS, they didn’t seem to look as good. The challenge was learning how to get the right mix of colors. Some choices worked better than others. The colors may look good in a photograph, but they make not work well in designing a theme.

This was an experiment. Not all experiments work out. From every experiment, you learn something. You learn what to do, what not to do and how to do better the next time.

Have you had success in designing a theme from a photo?