The Acumen software design blog provides you with helpful articles about WordPress.

WordPress is an open-source content management system based on PHP and MySQL. WordPress is very user-friendly and a great content management tool for both small and large businesses. Business owners can install a variety of WordPress plugins to customize their site as much or as little as they’d like. WordPress allows its users to choose from hundreds of themes, and the CMS site even adds new additions to its theme selection weekly. Acumen provides software development services for WordPress.

Several web sites provide a good overview:

Official WordPress Features page  WordPress Wikipedia

Contact Form 7

The old mechanism of submitting form events to Google Analytics involved using the “Additional Settings” tab of a specific contact form using code similar to:

	on_sent_ok: "ga( 'send', 'event', 'Contact Form', 'submit' );"

In WordPress, it will look like this:

Contact Form 7
Note the “Deprecated settings are used” message.

Contact Form 7 has deprecated the on_sent_ok hook and now requires an addEventListener for ‘wpcf7mailsent’, as mentioned at the bottom of this page:  https://contactform7.com/tracking-form-submissions-with-google-analytics/

Unfortunately, this article does not clearly indicate a convenient way to add the addEventListener.  It is NOT done through the Additional Settings tab, but must have a javascript snippet added with some other mechanism.

We recommend using a custom javascript plugin such as “Simple Custom CSS and JS”.  Once Installed and Activated, add a new JS Code entry.

Contact Form 7

With the following code:

	document.addEventListener( 'wpcf7mailsent', function( event ) { ga('send', 'event', 'Contact Form', 'submit'); }, false );

In WordPress, it will look like this:

 

Also note, if you are using Autoptimize – which we highly recommend – you may need to check your JavaScript Options if you do not see the addEventListener in your page source code. (Right-click the page and select View Source.)

 

WP CMS

The latest variation of WordPress CMS is packed with your typical functions, maintaining ease-to-use functions and for that reason, the listing of functions has increased greatly over the years, along with theme variety makes it easy to generate income.

If you also include excellent plug-ins, Constant Updates, a WP Support community that is second-to-none, SEO made super easy and just Setting up a WordPress website is affordable.

Nevertheless besides blog writing tool, WordPress is among the very best platform for Web Development, uncomplicated to utilize and also versatile.

Why WordPress Development is very useful for business

1. It is Safe and secure.
Since WordPress is a popular CMS, it should not be surprising that it’s a target for hackers. The WordPress take the the secuity of its user very seriously.
2.It is  Easy to use.
The WordPress is very easy it is to use. The platform is user-friendly, intuitive and easy to learn. In fact, you can learn how to use wordPress in a matter of minutes.
3. Lots of support.
WordPress is provides lots of support. This is in part to the extensive WordPress community where you can troubleshoot any question or concern through the WordPress
4. Easy to manage
WordPress is equipped with a built-in updater for security purposes, WordPress also notifies you whenever there are updates for your themes and plugins. This makes managing your WordPress  site a breeze, since you’ll always be current on the latest updates. That will keep your site safe and fresh.

8 Awesome WordPress Web Apps Paving the Way for WordPress as a SaaS Platform

Sometimes you need a web app and don’t have the time, skill, or budget to do custom development. Developing from scratch can be the solution for many problems, but it can take much longer than starting from an existing code base.

WordPress was originally designed as a blogging platform, and it continues to be well known for that. However, it has evolved into a fully fledged content management system (CMS) and, for some purposes, can even produce a solid web application – quickly, and at a significantly lower budget than custom development.

This article will introduce the idea of building a web app on WordPress, show you why you might consider it, examine some tools for building web apps in WordPress, then look at some great examples of what is possible.

Why Use WordPress for Web Apps?

Web apps can be custom coded from scratch, and many developers remain purists who feel that’s the only way to go. However, web application frameworks have been developed to help make the process of building web apps easier.

Ideally, building a web app would be quick to start, so you could get going and take advantage of some common built-in functionality. Wikipedia defines a Web Application Framework as:

…a software framework that is designed to support the development of web applications including web services, web resources and web APIs. Web frameworks aim to alleviate the overhead associated with common activities performed in web development. For example, many web frameworks provide libraries for database access, templating frameworks and session management, and they often promote code reuse.

With that in mind, it’s not hard to see how some people started to look at WordPress as a possible web application framework to help them build web apps. Though not specifically designed for that, WordPress has several features that make it a solid choice for your web apps, for example:

  1. Security, user registration and login: WordPress has user roles, which by default belong to one of five access levels, and can be assigned to different capabilities (e.g. edit posts).
  2. Database and URL mapping: WordPress enables you to easily connect to its database and run queries. You can modify how URLs are generated using pretty permalinks and add or modify the rewrite rules.
  3. Theming: WordPress themes offer a very flexible means of designing pages for your app.

WordPress isn’t always going to be the best tool for all types of web apps. It can work well for simple CRUD (Create, Read, Update, Delete) apps, and more complex functionality like calendar bookings, for example, can be done by integrating existing plugins. In general, projects related to publishing some form of content online may be possible candidates for using WordPress, especially where you want to use the same content across multiple products (e.g. website, mobile app etc.).

Tools for Building Web Apps in WordPress

While WordPress does offer built-in features we can use for web apps, you may require additional functionality. The built-in page and post structures can be used for a lot of things, but if you need custom data and fields to be added, searched or queried, manipulated, and displayed, some additional work is needed. Fortunately, tools do exist to help expand on WordPress’ native capabilities.

WordPress does have custom data capabilities in the form of custom fields, post types and taxonomies, but tools for working with them have been left up to plugins. Here are a few that have proven quite useful in moving WordPress away from simple blogging:

1. Advanced Custom Fields

Advanced Custom Fields plugin

Available for free in the WordPress repository, Advanced Custom Fields (ACF) has been a long-standing favorite of developers for adding custom data functionality to WordPress. It provides a way to visually create custom data fields of various types (e.g. checkboxes, images, relationships) and easily load data through a simple API. It uses the built-in custom post types and metadata and so is easy to use and fast. For more content types and the ability to add options pages, you’ll need to purchase a licence for ACF Pro (which starts at $25).

2. Piklist

Piklist Framework

Billed as a rapid development framework for WordPress, Piklist enables you to easily create custom post types and taxonomies, add metaboxes and metafields to all the WordPress data types (posts, pages, media etc.), and create settings pages and widgets. The Piklist Framework can be downloaded for free from the WordPress repository.

3. Gravity Forms

Gravity Forms

Gravity Forms is an advanced form builder, and includes a lot of functionality that can help with web apps. You can create forms to do CRUD operations on posts, pages and custom post types, as well as take advantage of functionality like commerce, scheduling and logic. Gravity Forms starts at $39 for a personal licence which doesn’t include any of the add-ons.

4. Toolset

Toolset Types plugin

Toolset enables you to add custom types and fields to the WordPress admin and create ‘parent/child’ relationships between different types, to build relational-type databases. You can create custom page templates and archives for displaying searchable custom data. It also includes built-in functionality for creating front end forms for submitting content and editing. The Types plugin is free, but access to more advanced functionality requires purchasing the full Toolset (starts at $149).

5. WordPress REST API

WordPress REST API plugin logo

No discussion about using WordPress for web apps would be complete without considering the REST API, especially with a non-WordPress front end. Finally moving from the outskirts as a plugin into WordPress core, the REST API is changing the way apps interact with the WordPress back end, as shown in the recently released Calypso desktop app. We will be seeing more development in this area going forward as the code matures.

8 Awesome Web Apps Built on WordPress

Now that you have a broad understanding of how WordPress can be used as a web app framework and have familiarised yourself with a few of the plugins that can make life a lot easier in the process, let’s explore six awesome web apps built on WordPress that showcase just how capable the world’s favorite CMS is!

1. Train.rs

Trainrs web app

Train.rs provides a totally custom WordPress admin for managing personal trainers’ business.

Train.rs provides online business management for personal trainers. It uses WordPress as a foundation to give users hosted websites with customized administration of clients, training schedules, and billing. With the focus on users and custom data, WordPress makes easy work of this app.

2. YouTooCanRun

The YouTooCanRun homepage.

YouTooCanRun is a custom WordPress solution for managing the organization of marathon races, including paid registration of participants, generation of bib numbers and management of the event. It uses a combination of the Event Espresso and WooCommerce plugins to provide the needed functionality. As most of the functionality required was standard event and commerce behaviour, a WordPress solution combining plugins was perfect.

3. Pressbooks

Pressbooks web app

Pressbooks manages book content and prepares it for publishing.

Pressbooks is online book production software. They have both a hosted version and a WordPress plugin. You can create your book online and then export to various file formats for book publishing. The tool is built in WordPress using customized admin screens for managing book information, for example. Pressbooks focuses on content, so WordPress is a great tool for this.

4. Focused on Fit

The Focused On Fit homepage.

Focused on Fit is an online fitness community built on WordPress. Interesting features include a database of food and recipes with nutritional facts, and the ability to log your meals and exercise and track your progress towards your goals. It goes further and uses the REST API to pull that data into mobile apps for use on the go. The social aspect and user management makes this a good use case for WordPress.

5. StudyChurch

The StudyChurch homepage.

StudyChurch is a web app designed to help small church groups work through study materials together. It pieces together several WordPress plugins, such as BuddyPress, and a forum to enable users to write lessons that are available to group members who can then discuss and collaborate on the answers. With the focus on users management and content, this is a great use case for WordPress.

6. Nomadbase

NomadBase web app

The REST API powers this app as it pulls together location data for digital nomads.

Nomadbase is a real time map for digital nomads. Using location data from your social media apps (Facebook, Swarm, Twitter or Instagram), users’ past, present and future positions are shown on a city-level to other nomads to encourage connections and interactions. It is built using the REST API with a React and Leaf front end. This is an interesting use case for WordPress, focused on user data.

7. Code Cavalry

The Code Cavalry homepage.

Code Cavalry enables coding novices and web designers to connect with experts over Google Hangouts to solve problems. Though based in WordPress, the app interacts with Firebase through AngularJS. The developer outlines the approach taken in The Road to Code Cavalry. The focus of this app is the users and so using WordPress gave a good head start in development.

8. Hello Bar

The Hello Bar homepage.

Hello Bar is a ‘Software as a Service’ (SaaS) platform designed to help users monetize their websites by building an email list. It provides you with ways to promote content, get more subscribers and measure and test the effectiveness of your campaigns. For more detailed information on how the team approached the development of Hello Bar you can check out the series of articles they wrote. They took advantage of WordPress’ built-in user management with custom themes and plugins to provide an experience that looks nothing like WordPress.

Conclusion

While WordPress is not perfect or suited for all web application needs, it can be a very useful tool for certain types of web apps. Stop thinking of it just as a blogging platform and you can start to see the possibilities for using its existing structure to help bring a web app to life quickly and under budget.

We have provided you with several examples of web apps built on WordPress which should have provided some inspiration and food for thought as to how you can use WordPress for more than just basic websites.

Have you built a web app using WordPress? Please share your favorite tools and tips that we may have missed in the comments section below!

Article thumbnail image by ideyweb / shutterstock.com

Article thumbnail image by Tom Ewer / elegantthemes.com

WordPress

Our WP development team ran into a problem with the Media File Manager plugin by Atsushi Ueda in which the code was attempting to read from an array index that did not exist. This resulted in a Notice level error from PHP, and thus broke the file manager.  We think this utility is very useful to our CMS development, so we investigated a fix.

WordPress

 

Here is the issue we ran into:
Notice: Undefined offset: -1 in /path-to-wordpress/wp-content/plugins/media-file-manager/media-relocator.php on line 236

Line 236 contains the following:
$dir1[$i]['thumbnail_url'] = mrelocator_path2url($dir . $dir1[$min_child]['name']);

Solution

Change this to the following to resolve the issue:
if (isset($dir1[$min_child])) {
$dir1[$i]['thumbnail_url'] = mrelocator_path2url($dir . $dir1[$min_child]['name']);
}

 

References

Keywords

WP, plugin, PHP, CMS development

For information about how Acumen can help with your Software needs, contact us today!

 

 

OneLogin is a great service that allows companies to use Single Sign On to allow their employees or customers to access a multitude of other applications using a single username and password. We are currently using it to do just that for a client – allow their customers to sign into their WordPress platform and other linked applications using just its authentication. Once the user is in WordPress, we can use the Embedded API and the Launch API offered by OneLogin give them a customized portal that utilizing single signon. Here’s how we did it on a high level.

Solution:

  1. Configure your application and your users. To attach an application to a user, open up your app.onelogin.com interface. In the top taps, go to “People”. Click “edit” next to the user you wish to add an application for. Then, to go to “Apps” tab for that person and click “add app“.
  2. Get the Embedded API security token. This can be found at https://app.onelogin.com/embedding. Check the “Embedding API can be used” checkbox and submit the form. If a token isn’t shown, click “Generate a new token“.
  3. Download and parse the apps XML file from OneLogin. The endpoint for this is https://app.onelogin.com/client/apps/embed2?token={security token}&email={email for requested user}
  4. Use the ID from the parsed XML to create a Launch API link. The URL for a Launch API link is https://app.onelogin.com/launch/{app id}

All you need to do is supply your security token to the class, pass the email to get_apps_for_user() function, and pass your HTML templates to the toHtml() function. The example on that GitHub page will show you how to use this inside of WordPress. Feel free to comment if you have questions or comments.

 

Want to see what kind of website or WordPress integrations we can offer your company? Check out our Website Development page and contact us!

DB Editor 

DB Editor in WP

When developing WordPress websites we like to use the Formidable Pro plugin for creating forms. Its quite handy but we’ve had it stop working on two sites. We get a:

We’re sorry. It looks like you’ve already submitted that

Error message every time a form is submitted. There’s a fix but it took a while to figure out. It seems to happen when you have the free version of Formidable installed on your website with forms built and you try to install Formidable Pro.

Here is the solution that has worked for us two times now. Beware this solution deletes all existing Forms. You can export the old forms and try to import them back in but we haven’t had a lot of success with this.

  1. Formidable – Global Settings
    1. Uninstall Formidable
  2. Plugins – Formidable
    1. Deactivate
    2. Delete
  3. Using your database Editor navigate to your website
    1. Drop Tables
      1. wp_frm_fields
      2. wp_frm_forms
      3. wp_frm_items_metas
      4. wp_frm_items
  4. Plugins – New
  5. Upload Formidable
  6. Activate Formidable
  7. Enter Pro License
  8. Update Database option appears, click it

You should now be able to create and use forms normally.

Take a look at our WordPress Web Development page for more ways we can help you!

WordPress Template 

WordPress Template

My boss was kind enough to allow me to attend WordCamp 2014 in St. Louis last weekend and I learned a lot of things but one thing that has already proved useful is a plugin called What The File.

This plugin identifies what template a particular page is using.
It can be a real hassle in WordPress to figure out which template is being used on a page. Who among us hasn’t typed “asdf” at the top of a template and then refreshed half a dozen pages trying to find the right template? Go ahead, raise your hand if you’ve done it!

Once you install What the File you can go to the front end of your WordPress website and on the Title Bar at the top you’ll see What the File. Click it and marvel in the magic.
A big thanks to Barry Kooij who developed What the File.

See our WordPress Development Page for ways we can help you get the most out of your website!

GA Codes 

GA Codes

At Acumen, we want to add Google Analytics on our WordPress installation, and we want the ability to track our posts and our pages separately using Google Analytics properties. We also want to keep our analytics more accurate by filtering out visits from our team members. To do this, we decided to build a free plugin, Smarter Analytics. Smarter Analytics allows you to:

  1. Apply different tracking codes to posts and pages
  2. Apply tracking codes on a per-post/per-page basis
  3. Filter out IPs from being tracked
  4. Filter out logged-in users from being tracked

GA Codes

When the plugin renders the script, it first makes sure you do not fall in the exclusion rules.

If you do, it comments out the script in HTML so users can see why the script has been commented out and what code would have rendered – this is very useful for testing!

But if the script is to be rendered, it first checks to see if the post has its own code setting.

Then, if it does, it renders. If not, it falls back to the post/page and global defaults.

Download the source code from the WordPress plugin directory and add Google Analytics to your WordPress installations with ease. (We’re using it on this site!)

Have a question about this plugin? Feel free to ask by commenting below.

For information about how Acumen can help with your software design needs, contact us today!

WP Menu

While moving a client over to WordPress, we wanted to take a hard-coded menu with icons and descriptions into a WordPress-controlled menu that allowed the administrator to update the menu with ease from the WordPress control panel.

Unfortunately, this functionality is not completely offered by WordPress. While updating the Screen Options in the WordPress control panel will allow you to add the Description to your menu’s advanced properties, WordPress does not give you a way render the descriptions with your link. To solve this, I created a plugin.

To achieve this, I first had to implement a Walker_Nav_Menu object that would render each menu item how we want it. I was able to get most of this from a blog post I found online.

I then implemented a custom WP_Widget object. It contains the widget form for the WordPress control panel as well as the rendering process for the public view. The rendering processes used the Walker_Nav_Menu object to display the menu with descriptions.

You can download the source code from the Descriptive Menu Plugin page in the WordPress Plugins Directory. You can also check out our release post.

For other WordPress help please visit our WordPress Web Development Page and see what we can do for you!

 

Today, we released the Descriptive Menu Plugin on the WordPress.org plugin repository. This plugin allows us to display a menu with the menu item descriptions using a simple widget. It also provides an optional icon element. With simple and clean markup, you can easily style to make it look the way you need it to. Here’s an example of what we did with it:

The Widget

The Result

You can bring this functionality to your WordPress site with ease by downloading the plugin from the Descriptive Menu Widget’s WordPress Plugin repository page.

Use the following CSS selectors to style your Descriptive Menu:

#descriptive_menu-[id] This is the wrapper for the whole widget
#descriptive_menu-[id] .widget-title This is the title of the widget
#descriptive_menu-[id] .descriptive-menu This is the actual menu object
#descriptive_menu-[id] .descriptive-menu-link This is a span wrapper around the menu item anchor.
#descriptive_menu-[id] .descriptive-menu-icon This is an empty span you can use to display an icon. Add menu item classes to add specific icons for items.
#descriptive_menu-[id] .descriptive-menu-description This is the description paragraph tag.