Toggle navigation

WP Contacts Documentation

Version 3.0.6

A big Thank You for purchasing our Premium WordPress Plugin WP Contacts!

WP Contacts offers many great features to get you well on your way to managing your leads, contacts, or just about anything else you need to keep track of.  Many hours have gone into the creation of WP Contacts (and still do!) to make it as useful as possible to you.

This documentation will guide you through working with the plugin you have purchased.  This documentation is also a living document, so be sure and check the latest version http://docs.wpcontacts.co/xdocs/wp-contacts if you are viewing an offline page.  If you have trouble with something along the way, our support area is at scripthat.ticksy.com.

Once again, thank you very much and we hope you enjoy using WP Contacts!

 

 

Installing WP Contacts is as simple as uploading the plugin zip file to your WordPress website.  When you purchase WP Contacts you will download a zip file from Envato containing all files.  The plugin itself will be a zip file contained within the main zip file called shwcp.zip …this will be the file you will upload to your WordPress installation.

  1. Using an unzip program, retrieve the shwcp.zip file from the download zip file you received from Code Canyon and place it somewhere that you’ll remember.
  2. Log in to your WordPress Admin and click on Plugin > Add New (as shown below)

3.  Click on the upload Plugin button and you will see a file browser to select the file to upload from your computer.

4.  Select the shwcp.zip file you recently extracted on your computer and select the Install Now button.

5.  After it is uploaded, you will be able to activate the plugin and you should do so now.

If you followed the steps above, WP Contacts is now installed and active, and now ready for you to start inputting your settings!

 

WP Contacts is packed with options for customizing the appearance and the operation of how you are going to work with the tool.  After installing and activating WP Contacts you will want to configure some settings for it.

The first thing to do is go to the WP Contacts tab on the left side of your WordPress Admin bar which is shown here:

Database Management

Starting with version 2.0.0 and above, you can now create and manage as many separate databases as you want!  Each database has it’s own settings, permissions, snapshots and is completely independent from any others you create.  You can add and remove databases at any time.  After you have created one and have created a page for WP Contacts be sure to select the database you want to use on that page like in the WordPress page view screenshot below:

Database Specific Tabs

There are currently 4 tabs (we may add others later) within the WP Contacts settings, the first tab will have general settings for the tool, the second tab will have user permissions, and the third tab has information about your site (file upload size, memory etc.) and is purely for reference.  The forth tab lets you take snapshots, restore and reset the database you are working on.

 

WP Contacts Main Settings Tab

The Main Settings tab has several options that we will go over below:

The Main Settings tab starts with telling you to set a page for WP Contacts.  You need to do this so that you can display the contacts views on the frontend and work with it once it’s in place.  To do so, go to your pages tab in the left menu and either create a new page, or select an existing one to edit.  The page you select or create will need to use our custom template to display the frontend, so select the WP Contacts Template under Page Attributes on the right side when editing the page.  Once you save it, this will be the page your contacts will display on.  If you have multiple databases you will also need to select the database to assign to the specified page (as in the image above)  otherwise the page will just use the default database.

Please note that whatever page you will use for WP Contacts will only output the frontend tool for WP Contacts. Meaning, you’ll want to use a blank page and not something with existing content.

Public Accessibility – Choosing True on this setting would allow everyone read access to your contact information.  Not really recommended since most people want to keep this kind of information private but is an option for those that do.  Keep in mind that if this is turned on, all users will have at least read only access to the site as well.

Use Pagination – This is recommended in the case you have a lot of contacts all results will be shown in paginated results which you can set on the option below.  Pagination settings affect both the main view and the activity log view on the front end.

Pagination Results– Choose between 1 and 200 results to display per page.

Default Front Sort – Added in version 1.2.3, you can change the default sorting of your contacts based on field and direction.  The standard default is ID descending (for newest contacts added to display at the top).

Show WP Admin Bar – This setting toggles the display of the WordPress admin bar on and off on the front end and adjusts the page accordingly.  We prefer to have it off but this is up to you.  This only affects the Contacts front end page.

Primary Color – This setting lets you choose the main color to use for the front end of WP Contacts.  You can pretty much use any color besides white since white is the main background color and main text color for respective site areas.  If you are comfortable with CSS, you can override styling at the bottom of this tab with pretty much anything you want.

Logo Image – This is your main logo used to display at the top of the side navigation bar.  The image will be responsive so it will adjust to the sidebar width.

Keep in mind that it’s probably better to upload a logo that is not larger than the sidebar width (300px) since large images will take longer to load and will become distorted if too large or text will be unreadable when the image is fit into the sidebar area.

Footer Text – This is the text displayed at the bottom of the WP Contacts front end page.  Add any text you would like here, this will also be your site’s primary color.

Greeting Text – This text will be shown on the login form when people are logging in to the front end.  Be sure to keep the message simple so it’s not too much text on the form.

Entry Image – This setting allows you to enable or disable the contact entry image capability.  As shown in the demo, contacts have images related to them and you can upload images to associate with them.  A small thumbnail (25 x 25px) will also be generated for the Main page view when you upload an entry image.

Default Entry Image – You can set your own default image to associate with new contacts that do not have an image associated with them yet.  Some people might set here an image to visually show that it’s a new contact.  If images are enabled and this is not set, the system default will be shown for those not assigned.

Contact Uploads – This enables or disables the ability to upload files associated with a contact.  This is one of the features many people have told us would be nice to have with a contact system.  If this is enabled, you will have the ability to associate files with contacts on the individual contact page that are available to view and download.  Some people would use this for uploading documents or images related to a contact.

YWhen uploading files or images, you will need to be aware of your server’s limitations for file sizes. This will directly affect the size of files that you can upload to your server. You can check the Site Information tab to see your current limits and check with your hosting provider if you need to increase them.

Envato Purchase Code – Enter the purchase code you receive from Envato when you purchase WP Contacts so that you will receive automatic updates to WP Contacts when they become available.  Be sure to save your settings after setting this (or any other setting for that matter).

Fixed Edit Column – This enables the ‘quick edit’ menu to stick to the right side of the screen, useful if you have a lot of columns on the main page.

Search All Fields – Enables a ‘Search All’ option to the search capability, take note of the warning as this can impact search result speed.

Enable Events – Choose to enable the events calendar with this database.

Enable Event Notifications – Allows the capability to send alerts for events created on the calendar…make sure and test your server’s email capability if you plan to use this

Calendar New Entries – Enables new entries to display on your calendar

Calendar Date Entries – Enables custom fields that use the Date Time field type to show up on your calendar.

Enable MailChimp Export – Enables MailChimp list syncronization on the Import and Export page

Use WordPress Date & Time – Enables all dates to use the format for date and time ( set in Settings -> General in WordPress Admin Panel) .  As a side note, the WordPress datepicker does not support as many formats as PHP so just be aware of that if creating your own custom date formats that are not pre-configured in WordPress.

Custom Menu Links – You can add your own external links or links to other databases on this option that will show up on the Front End main menu.

Custom CSS – We’ve included the capability for you to add your own custom css to WP Contacts.  If you are familiar with CSS, you can override many styling elements of WP Contacts and by doing it this way, any automatic updates will preserve your custom CSS code set here.

We’ve added custom css classes to the main page table view that you can target with your own custom css (handy for coloring the background of specific data).  Each td element will have the following classes that are dynamically generated from the column names and values:

  • colnum-x – where x is the numbered column from left to right (e.g. colnum-5)
  • col-xxxx – where x is the name you’ve created for that column (lower cased, up to 12 characters of it, without spaces or special characters)
  • val-xxxx – where x is the value that the field has (lower cased, up to 12 characters of it, without spaces or special characters)

An example: Lets say you want the background color for all your Sources that have Default set as the value to be grey.  Each td element on that page would look like the following…

<td data-th=”Source  ” class=”colnum-7 col-source val-default”><a class=”individual-link” href=”http://localdev.com/wpbeta/site2/wcp/?wcp=entry&lead=1″>Default</a></td>

So you could create css in your custom css to target this like so

.col-source.val-default {
    background-color: #999999;
}

And that would set all Sources with the value of Default to have grey backgrounds!  Be sure to read below and reference our field types page for other custom css examples.

Custom Javascript – Add your own javascript code to WP Contacts in this entry.  Useful if you are familiar with javascript and want to add extra functionality to the front end.

 

With version 2.0.0 and above each page now includes a view specific class (full access, ownleads, readonly, and none).  If for example you want to hide certain page elements from display based on access (like you don’t want readonly users to see certain information or links) you can target with these classes.  For example, let’s say you didn’t want read only users to see your events calendar but you want to use the calendar.  You can hide it with CSS code like this…

.wcp-access-readonly .eventslink {
    display:none;
}

This opens the door to all sorts of futher customizations, the page classes are listed below…

wcp-access-full — Full Access
wcp-access-ownleads — Own Leads Access
wcp-access-readonly  — Read Only Access
wcp-access-none  — No Access

If using custom roles, the page class will include wcp-access-Custom followed by a unique identifier.  You’ll need to use Chrome Inspector or similar to find the unique name (e.g. wcp-access-Custom-71491688854489).

Version 2.0.4+ let’s you target specific users now as well by adding a class to the page with the current user id in the following format…

wcp-user-xx

Where xx is the id of the currently logged in user.

User id’s can be located by going to your WordPress Menu -> Users and click on the user you want to work with .  In the url of your browser you should see the user id in your admin url like ?user_id=1&…

An example for hiding menu links for a user with id 1 is given below…

.wcp-user-1 .drawer-menu li:nth-of-type(2),
.wcp-user-1 .drawer-menu li:nth-of-type(3),
.wcp-user-1 .drawer-menu li:nth-of-type(4),
.wcp-user-1 .drawer-menu .statslink,
.wcp-user-1 .drawer-menu .logginglink,
.wcp-user-1 .drawer-menu .ielink,
.wcp-user-1 .drawer-menu .eventslink {
    display:none;
}

and here is the corresponding mapping for each of those listed above

nth-of-type(2) = Front Page Sorting

nth-of-type(3) = Manage Fields

nth-of-type(4) = Sources Types & Status

.statslink = Statistics

.logginglink = Logging

.ielink = Import & Export

.eventslink = Events

 


 

WP Contacts Permissions Tab

Manage Own Leads Ownership Change – This setting allows you to decide if users that are set to manage their own leads can transfer or assign contacts to other users.  The default is to allow them to do so, but you can disable that here and they will not be able to transfer or see other users in the system.

The Permissions tab will contain a list of current WordPress users and their access to using the front end.  There are Four levels of access available.

  1. No Access –  Access to WP Contacts is not available for this user.
  2. Read Only – User can only view contacts and contact information, no editing capabilities are available.
  3. Manage Own Leads –  User can only view, edit and manage their own contacts.  They will not be able to see any other contacts.
  4. Full Access –  User has full access to the contacts, statistics, and front end settings.
  5. Custom Access Roles – New in version 3.0.6, users can be assigned custom roles that you can choose detailed access to the system for.  In order to use Custom roles simply choose Add New Role on this page, give it a name and select the options for access you want this role to have.  After saving, you can assign users to this new role you’ve create.

These permissions are separate from general WordPress permissions and are for WP Contacts only.  A couple of things to note are that if you have public accessibility set to true on the Main Settings page, all users will at least have read access.  If you add a new user to WordPress, you will have to set their access to WP Contacts as well on this tab (if you want them to have access to the system).

 

Site Information

The Site Information tab will show you your sites current settings for file upload sizes, maximum (simultaneous) file uploads, and maximum execution of a script.  If these settings are too low for you, you’ll need to speak with your web host or site administrator about increasing them for your purposes.

 

Database Operations

The Database Operations Tab gives you the capability to take snapshots (backups) of your contacts database and do some other handy things if needed.  One thing to keep in mind is that if you have a lot of contacts and a lot of files associated with them your servers PHP settings may need to be adjusted for some of the settings listed on the Site Information tab when dealing with backups or restoring data (especially script execution time).

Please Note that restoring or resetting the database will do exactly that.  So don’t use these options unless you intend to do so.

Backup Database – You can choose to create a backup of your contacts at any point in time that you would like.  Backups are smart to do before doing things like importing a large amount of data so that you can restore a previous backup if you forgot to set something when importing.  Creating backups from time to time is a smart thing to do.

Restore Database Backup – Under this section, you can choose to restore your contacts database with a previously created backup you’ve done.  Once checked, you will have a selection of current backups to choose from which you will select the backup you want and confirm the restore.

Current Backups – This section lists the current backups that you have in the system.  From this section you can also delete unwanted backups in order to save disk space.  If you don’t see any in there, you might want to create one!

Reset Database – Resetting the database will revert back to the original state of the database of when you first installed WP Contacts.  Some users have requested this option, so we’ve added it in here.  Just be aware that this clears out the database.  If you have anything important in your WP Contacts, you may want to reconsider using this option.

WP Contacts has extensive capabilities provided in a simple user friendly interface.  Many of the controls are drag and drop interfaces which you can even manage on small devices.  WP Contacts allows you the ability to customize the name of every field and the purpose of most of them (except for a few built-in fields).  You also have the ability to create as many extra fields as you need and set up the filtering capabilities (Sources, Types & Status) to be any name you want, along with any number of options with those.  You will be able to decide which fields display on the main page and what order, and you can also set the order of the fields for the individual view seperately.  In the end, you have an extremely powerful tool to manage your contacts, leads, or just about anything else you want.

Home Page

From the Home Page view, you will have the capability to sort, filter, search, add, edit, delete and paginate through all leads with a view that shows whatever fields you decide to show in this view.  If you have many fields displayed here, you will be able to scroll to the left and right.  On small screens the layout will change to a vertical implementation.  You can also enable the quick edit menu to be ‘sticky’ where it will always stay on screen with the backend option Fixed Edit Column set to True.  This is useful when you want many fields displayed on the main page and is shown in the image above.

We have also added a quick method to delete multiple entries with version 2.0 using the Check All and Delete Checked at the top right of the page.

Individual Entry Page

The Individual Entry page is available when you click on any of the fields for a particular contact on the Main page.  This view will show the contact image (if using this feature), all fields in the order you’ve set under the Manage Fields section, any files associated with this contact, and notes associated with this contact.

From this view you will be able to modify the contacts image, manage files, manage the field data, and add, edit or remove notes.  This view would be considered the complete contact view of all information that applies to the contact.

Contact images, files and notes will apply changes immediately when you submit them; whereas field edits will be applied after you click save for them.

Front Page Management

The Front Page Management area allows you to decide which fields will be displayed on the Front Page (Main page) and in what order for all of your contacts.  In this section you can drag and drop the fields in the order you want them displayed and move the fields you do not wish to display into the Fields Not To Display area.

You can also set the filters that are used on the Front Page as well here.  Filters let you drill down to specific views based on which filters are selected.

Changes made here are instantaneously saved when you make a change.

Manage Fields

The Manage Fields Area lets a user will full access add and remove fields to use in WP Contacts.  There are several fields that cannot be removed which are referred to as Core Fields.  These fields are needed by the system to track different information and will not have the remove capability.  All of the fields can be renamed to any name of your choosing.  You can sort the fields in any order you wish which will control the order of display on the individual contact page.

The fields here will have a small reference name (as seen above) which actually refers to the database column name.  This is no more than a unique identifier for the field and is not displayed within the other parts of the interface.  Once you’ve adjusted the fields to your own needs be sure to save them as no changes will take effect until you do so.

 

You can also set fields you create to be required for input, forcing anyone adding an entry to input something for those fields.

Different fields will have different requirements, here is an explanation for those…

  • Date Fields – Will verify a date has been entered
  • Email Address – Will check the format to validate an email address
  • Text Field / Text Area / Map Address / Phone Number –  Validates that input has been given
  • Checkbox / Rating / Group Title – Do not use required input capability
When you add a field on this screen. It will by default be added to the Fields Not To Display section of the Front Page Sorting. So if you would like it to display on the front page, you’ll need to set it there.

 

Manage Individual Page

The Manage Individual Page lets you change the layout of the Individual page view.  You can re-organize by dragging and dropping sections to where you want them and change the left side columns width.  Each section can be enabled or disabled here by selecting to disable it.  If there are no active tiles on one side of the layout, the layout will be full width.

Changes are saved instantaneously on this page.

Statistics

The statistics page is available to all users that manage entries (full access and manage own leads).  Users who manage their own leads will see statistics for their own entries only while full access users will see results for everything.  This page will give you summary information about your entries in currently 5 graphs (we may add more depending on what is requested).  These graphs will show new entries daily, weekly and monthly, Ownership count, and top 10 category count for each filter.  These graphs are dynamic (real time) and based upon counts that are currently in the database.

Logging

The logging capabilities of WP Contacts is a powerful feature.  Everything someone edits or changes is logged with very detailed information.   You will know Who made a change, when it was done, where they came from and what they did.  This is good in cases where you have several users working in a system and will allow you to know where changes have been made.

The logging page like the Front / Main page view of contacts will be paginated based on your settings set in the backend.  Much like the front page, you will also be able to sort the data and search for specific information that is set in any of the columns.  This page is only available to users with Full Access.  If your logging entries get too numerous for you, you can remove all logging events with the minus sign in the top right of the screen (of course that event will be retained).

 

Import & Export

Importing and Exporting are yet another powerful feature of WP Contacts.  We have included a pretty slick interface to allow you to move information in and out of WP Contacts.  Lets say you have a few hundred leads you want to import into the system, all you will have to do is upload a CSV, XLS, or XLSX file (with a top title row) and match up the fields from your sheet to what you have set up in WP Contacts.  Even the filtering fields (Sources, Types & Status) will add new options based on what you have set in your file.

This tool is available to all Full Access and Manage Own permission groups set in the backend of WP Contacts.  When uploading contacts, all contacts will by default be assigned to whoever does the upload for ownership.  If you have a sheet of data to import and want it assigned to different individuals, just have each of them upload the data you want assigned to them.

When exporting you will be able to select the data columns you want to receive in your export file.  Let’s say for example you just need email addresses for the contacts in your installation in order to load into an email campaign tool.  You will be able to select just that field for doing your export.

Users that only manage their own contacts will only be able to export their own contacts and users that have full access can export all contact information.

Starting with version 2.0.0 we have included the Sync to MailChimp option.  This is an awesome new feature that lets you input your MailChimp API key, choose a list and map the fields to update one of your MailChimp lists with new emails and contacts.  MailChimp will filter duplicates so you don’t have to worry about duplicating entries to your list.  When the sync is finished, you will get a summary of the entries that were added to the list!

 

Events Page

You can enable and disable Events in your WP Contacts backend settings along with a few other options of what is displayed and notifications.  The events calendar can include new entries and any Date Time fields you create in your contact system (if you enable these) on the calendar.  You can also add, edit and delete events – give them titles, descriptions, set the color, make them reoccurring events and enable notifications before or after the event at a specific time.  You can also choose who receives the notifications.

If you want to use notifications, you’ll need to make sure your server is configured correctly to deliver mail.  Below is a screenshot of editing an event:

 

 

 

 

 

 

All fields when created default to a standard text field, which in most cases is fine to use for all sorts of purposes.  But sometimes text fields are too small, or you want to send an email to a contact with a click (or tap), these are some of the things we’ve considered.  Keep in mind that all standard text fields link to the individual lead while some of the new fields (phone number, email address, website address, Google Map etc.) will link to their respective purposed type (more info below).

You can change the field type on any custom field you create.  This is available on the Manage Fields screen with the dropdown selection triggered by the icon in between the remove and sort icons as shown below…

As a sidenote, these are enhancements…you can leave an email field as a standard text field and it will behave like the standard field if you would like, the same goes with any of the new fields.  There’s also no limit to how many of each can be used.

The field types and their purpose are listed below:


Text Field

The text field is the default or standard field type when creating new fields.  This is what every custom field was before version 1.2.1 and you’ll still probably use this one in most cases.

Text Area

The text area field type is used when you’ll need more room for editing fields.  As a good practice, you probably won’t want to put these on the main contacts page as your contact entries will be taller.  The text area large editable entry is available on the edit individual lead page only.  Quick edits will still show a small edit field.

Phone Number

The phone number field is useful for making quick calls on a mobile device or when using a program that makes calls for you as it provides a telephone number link that these tools understand on the main page leads view.  So if a field is set to this it will no longer link to the individual lead page but will link to a number (e.g. tel:111-1111).

Email Address

The email address field is used for adding a mailto on the field in the main page leads view for quickly emailing a contact.  As with the phone number, this field will no longer link to the individual lead page but will bring up your email program when clicked or tapped.

Website Address

The website address field is used to link to external url’s, so if you want an external link field that can be clicked from the main contacts page this is the field type to use for the field.

Google Map Link

This field is used for physical addresses where you want to link the field on the Front Page view to a google map of the address for quick access to maps.  These fields are shortened for display since addresses are usually longer, hovering over them will show the full address.

Date Time Field

Date Time fields will enable a timepicker popup for the field to select a date and time for the entry.  These entries are also eligible to be displayed on the events calendar if enabled in the WP Contacts backend settings.  Once you convert a field to this, it will warn you that the database column that maps to this will be converted to datetime format (meaning existing information will be removed).

Date Field

Date fields will enable a datepicker popup for the field to select a date for the entry.  These are different than date time fields in that they display dates only (no timestamp).  These entries are also eligible to be displayed on the events calendar if enabled in the WP Contacts backend settings.  Once you convert a field to this, the database column that maps to this will be converted to date format (meaning existing information will be removed).

Dropdown Field

The Dropdown field type was introduced in version 2.0.4.  This allows you to create as many dropdown custom field types as you wish.  Once you set a field to a dropdown, save it and you will be able to manage the options for it in the Manage Dropdown Options tab.  Keep in mind that Dropdowns (like Date Time Fields) store data differently than other field types so if the field is later changed to a different field type – existing data will be removed and the same is true when setting a field to a dropdown from another type.

Dropdown fields are also unique because they can be set as filters on the frontend management page where you can add as many as you like for filtering views.

Rating Field

The rating field includes a handy 5 star rating capability field type.  This will give you a simple click to set a rating for an entry and can be set to show on the main page for quick reference of the rating.

Checkbox

The checkbox field is useful for a simple on/off indicator that you can use for any purpose you find helpful to manage your database.

Group Title

The group title field type is used to organize fields with a separator.  These are available for you to further group your fields on edit forms so you have more control of the layout.  You can add as many as needed to your forms and label them what you want.

Further Customization

We have assigned CSS classes to the links on the front page view for each of the linking field types making it easier for you to customize these further using the backend settings Custom CSS field.  Below is a list of the types and their corresponding class names.

[sh_table columns=”2″ style=”noborder” tr_bgcolor=”#f9f9f9″ tr_altbgcolor=”#ffffff” bordercolor=”#dddddd” hovercolor=”#f5f5f5″]
[sh_head]Field Type,, Class[/sh_head]
[sh_row]Phone Number,, tel[/sh_row]
[sh_row]Email Address,, type-email[/sh_row]
[sh_row]Website,, type-url[/sh_row]
[sh_row]Google Map Link,, type-map[/sh_row]
[/sh_table]

Example Usage…

.type-url {
    color: red;
}

Date Time fields have extra classes that you can target to color code them to give you more info on a date that is coming up or past.  Below is a list of the formats of these…

date-in-1y (future years)
date-past-1y (past years)
date-in-2m (future months)
date-past-2m (past months)
date-in-3d (future days)
date-past-3d (past days)
date-in-4h (future hours)
date-past-4h (past hours)

The number value corresponds with the actual time difference between the field time and current time.

 

WP Contacts includes many features that allow you to extend it for use with other applications and tools.  We also include hooks and filters for easy access to developers in modifying output and behavior.

Zapier extension for WP Contacts

We now have an extension available for WP Contacts to allow you to integrate with Zapier.com. Zapier lets you integrate with over 750 popular applications (such as Gmail, Slack, MailChimp…many more).

In order to use WP Contacts with Zapier, here’s what you’ll need:

  • Our WP Contacts Zapier extension
  • Running version 3.0 or higher of WP Contacts
  • Activation Code – received from us upon purchase
  • A WordPress admin account username and password to work with Zapier
  • Your website url and the name of the WP Contacts database you’ll be using (typically Default)
  • An SSL Certificate for your site (Zapier requirement)…it can be self signed.
  • An Invitation to our application – Here it is!

Some notes about the above points:

If you would rather not put one of your WordPress passwords in Zapier, you can set up the plugin Application Passwords to create a specific password for applications tied to a username.  This keeps the password strictly used for applications (you cannot log into the admin with them).  Here’s where you can get the free plugin https://github.com/georgestephanis/application-passwords/

Zapier requires sites to use ssl (https) in order to communicate with them.  You can easily generate a self signed certificate for your Website and in your Zapier account under Settings (top right) -> Advanced Settings -> Monkey with advanced settings you can Disable SSL Certificate Checks.  Check with your webhost if you need assistance in creating an ssl certificate for your site.

Once you install our Zapier extension for WP Contacts on your WordPress installation, you’ll need to go into your WordPress admin menu -> WP Contacts -> Zapier Extension and enter your Activation Code to enable it for use and for updates.

When setting up a Zap, the requirements above for your WordPress url, WP Contacts database name, an Admin username and Password will be necessary to connect your account with zapier.  Here’s what that looks like on Zapier:

When entering your website url do not put the https:// part of the url, this is already accounted for.

For example your site is:

https://www.yourwebsite.com  you would put www.yourwebsite.com

here.

Keep in mind if you change the name of a database in WP Contacts, you’ll need to update your Zapier zap Account settings to include the new Database name.
If you have trouble authenticating (getting 401 errors) and you are sure you have the correct admin credentials, check if your webhosting is using fastcgi, if so you may need to add the following entry to your .htaccess file directly under the RewriteEngine On entry

RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

WP Contacts REST - Version 1

Starting with version 3.0 and above of WP Contacts we have greatly expanded the capability for users to tie in other applications using the WordPress REST api and our custom endpoints.  This opens the doors to all sorts of possibilities with WP Contacts, for example having a form submitted on another site (e.g. www.yoursite1.com) can send the information to create that contact in your WP Contacts database (e.g. www.yoursite2.com).  Or, if an entry is created in WP Contacts, you can for example send a notification to an email address or any other tool that can work with REST (or uses Webhooks).

Obviously, some understanding of REST API’s, authentication, and SSL are going to be necessary for implementing a service like this.  While a REST service provides the means for communication between applications, it is up you to either have the knowledge or resources to implement this functionality.  Support for these items functioning correctly on your site is well beyond WP Contacts support.  Although, if you open a ticket for customization help and we have the resources at the time, we can offer assistance for a fee.

WordPress itself has built-in endpoints but we actually add our own as well which are listed below.  Be sure to take a look at WordPress’s documentation on using the api https://developer.wordpress.com/docs/api/ .  You’ll also want to use some form of Authentication as well and you have at least 3 choices on your approach:

  • Basic Authentication or Application Passwords
  • OAuth1a
  • OAuth2

Here is a resource that explains these as well http://v2.wp-api.org/guide/authentication/ .  For OAuth2, here is a plugin that provides a server for authentication – https://wordpress.org/plugins/oauth2-provider/ .

WordPress version 4.7+ includes the REST API in core, so you won’t need to install anything extra for that functionality.  What you probably will want to do is add authentication and more than likely encrypt communications by using an ssl certificate on your website (https) and have your applications only communicate over https.  Oauthv1 is about the only recommended method for unencrypted communication with the WordPress API but it’s currently the most difficult to get running.  At the end of the day, these decisions are all yours to make as to how you authenticate with your WordPress installation.

Requirements

Requirements for using the WordPress REST API with WP Contacts are as follows:

  • Running WordPress version 4.7+ (or you’ve installed the WordPress REST API plugin for previous versions – highly recommended to be running the latest version of WordPress though).
  • Running version 3.0+ of WP Contacts for this functionality to be included
  • Authentication is required (choices listed in the introduction) and the authenticated user must be a WordPress Admin to access our endpoints
  • PHP version 5.5+ recommended and required for some of the authentication plugins listed above (OAuth2 Server)
  • The ability for your website to send and receive POST and GET http requests from another API
  • Required –  “pretty” permalinks enabled. Please ensure that the permalink setting is NOT set to the default (http://mydomain.com/?p=123) before trying to use the API. Any setting other than the default will be fine.
  • Highly recommended to use https for endpoints and hooks – to protect against usernames, passwords, tokens etc. being intercepted by a third party

REST Endpoints (10 total)

 Ping – GET

endpoint: /wp-json/shwcp/v1/ping/

params

  1. none

https://yoursite.com/wp-json/shwcp/v1/ping

successful response

{
    "auth": true
}

description: Simple authentication verification endpoint

 

Total Count – GET

endpoint: /wp-json/shwcp/v1/get-entry-count/

params

  1. db (optional) – database name

https://yoursite.com/wp-json/shwcp/v1/get-entry-count/?db=Contacts3

successful response

{
  "count": "2",
  "database": "Contacts3",
  "database_number": "_2"
}

description: Returns the total entry count (“count”) in the database.  Requests will go to the default database unless another is specified.


Get Entries – GET

endpoint: /wp-json/shwcp/v1/get-entries/

params

  1. db (optional) – database name
  2. first (optional) – starting number
  3. limit (optional) – limit 50 results etc.

https://yoursite.com/wp-json/shwcp/v1/get-entries?db=default&first=1&limit=2

successful response

{
  "entries": [
    {
      "first_name": {
        "value": "Jim",
        "trans": "First Name"
      },
      "last_name": {
        "value": "Johnson",
        "trans": "Last Name"
      },
      "extra_column_1": {
        "value": "Option 1",
        "trans": "dropdown"
      },
      "extra_column_2": {
        "value": "4",
        "trans": "Rating"
      },
      "extra_column_3": {
        "value": "0",
        "trans": "Checkbox"
      },
      "extra_column_4": {
        "value": "",
        "trans": "Group Title"
      },
      "created_by": {
        "value": "sh-themes",
        "trans": "Created By"
      },
      "creation_date": {
        "value": "2016-12-09 17:53:10",
        "trans": "Created"
      },
      "updated_by": {
        "value": "sh-themes",
        "trans": "Updated By"
      },
      "updated_date": {
        "value": "2017-01-02 18:08:43",
        "trans": "Updated"
      },
      "l_source": {
        "value": "Default",
        "trans": "Source"
      },
      "l_status": {
        "value": "Default",
        "trans": "Status"
      },
      "l_type": {
        "value": "Default",
        "trans": "Type"
      },
      "owned_by": {
        "value": "sh-themes",
        "trans": "Owned By"
      },
      "id": {
        "value": "2",
        "trans": "ID"
      },
      "small_image": {
        "value": "http://php56host.com/plugins/wp-content/uploads/shwcp/2-small_image.png",
        "trans": "small_image"
      },
      "lead_files": {
        "value": "",
        "trans": "lead_files"
      },
      "notes": [
        {
          "id": "3",
          "note_content": "<p>Note 3</p>",
          "date_added": "2016-12-11 21:17:16",
          "creator": "sh-themes",
          "date_updated": "0000-00-00 00:00:00"
        },
        {
          "id": "3",
          "note_content": "<p>Note 3</p>",
          "date_added": "2016-12-11 21:17:16",
          "creator": "scripthat",
          "date_updated": "0000-00-00 00:00:00"
        },
        {
          "id": "3",
          "note_content": "<p>Note 3</p>",
          "date_added": "2016-12-11 21:17:16",
          "creator": "jimmy",
          "date_updated": "0000-00-00 00:00:00"
        }
      ]
    },
    {
      "first_name": {
        "value": "testeriif",
        "trans": "First Name"
      },
      "last_name": {
        "value": "test",
        "trans": "Last Name"
      },
      "extra_column_1": {
        "value": "Option Created Again",
        "trans": "dropdown"
      },
      "extra_column_2": {
        "value": "0",
        "trans": "Rating"
      },
      "extra_column_3": {
        "value": "0",
        "trans": "Checkbox"
      },
      "extra_column_4": {
        "value": "",
        "trans": "Group Title"
      },
      "created_by": {
        "value": "sh-themes",
        "trans": "Created By"
      },
      "creation_date": {
        "value": "2017-01-02 16:20:31",
        "trans": "Created"
      },
      "updated_by": {
        "value": "sh-themes",
        "trans": "Updated By"
      },
      "updated_date": {
        "value": "2017-01-02 17:31:09",
        "trans": "Updated"
      },
      "l_source": {
        "value": "Source 1",
        "trans": "Source"
      },
      "l_status": {
        "value": "Status 1",
        "trans": "Status"
      },
      "l_type": {
        "value": "Type 1",
        "trans": "Type"
      },
      "owned_by": {
        "value": "sh-themes",
        "trans": "Owned By"
      },
      "id": {
        "value": "89",
        "trans": "ID"
      },
      "small_image": {
        "value": "http://php56host.com/plugins/wp-content/uploads/shwcp/89-small_image.png",
        "trans": "small_image"
      },
      "lead_files": {
        "value": [],
        "trans": "lead_files"
      },
      "notes": [
        {
          "id": "6",
          "note_content": "<p>testing adding a note</p>",
          "date_added": "2017-01-02 17:12:58",
          "creator": "sh-themes",
          "date_updated": "0000-00-00 00:00:00"
        },
        {
          "id": "6",
          "note_content": "<p>testing adding a note</p>",
          "date_added": "2017-01-02 17:12:58",
          "creator": "scripthat",
          "date_updated": "0000-00-00 00:00:00"
        },
        {
          "id": "6",
          "note_content": "<p>testing adding a note</p>",
          "date_added": "2017-01-02 17:12:58",
          "creator": "jimmy",
          "date_updated": "0000-00-00 00:00:00"
        },
        {
          "id": "8",
          "note_content": "<p>testing one more time with note id and some formatting</p>\n<ol>\n<li>test</li>\n<li>tester</li>\n<li>testing</li>\n<li>testery</li>\n</ol>",
          "date_added": "2017-01-02 17:15:32",
          "creator": "sh-themes",
          "date_updated": "2017-01-02 17:18:19"
        },
        {
          "id": "8",
          "note_content": "<p>testing one more time with note id and some formatting</p>\n<ol>\n<li>test</li>\n<li>tester</li>\n<li>testing</li>\n<li>testery</li>\n</ol>",
          "date_added": "2017-01-02 17:15:32",
          "creator": "scripthat",
          "date_updated": "2017-01-02 17:18:19"
        },
        {
          "id": "8",
          "note_content": "<p>testing one more time with note id and some formatting</p>\n<ol>\n<li>test</li>\n<li>tester</li>\n<li>testing</li>\n<li>testery</li>\n</ol>",
          "date_added": "2017-01-02 17:15:32",
          "creator": "jimmy",
          "date_updated": "2017-01-02 17:18:19"
        }
      ]
    }
  ],
  "database": "default",
  "database_number": "",
  "request": {
    "db": "default",
    "first": "1",
    "limit": "2"
  }
}

description: Returns multiple entries from the database.  Response contains “entries” array with field original name array containing value and translated name.  Requests will go to the default database unless another is specified


Get Single Entry – GET

endpoint: /wp-json/shwcp/v1/get-entry/

params

  1. db (optional) – Database name
  2. field – real field name (e.g. first_name)
  3. val – matching value

https://yoursite.com/wp-json/shwcp/v1/get-entry?field=id&val=2

successful response

{
  "entry": {
    "first_name": {
      "value": "Jim",
      "trans": "First Name"
    },
    "last_name": {
      "value": "Johnson",
      "trans": "Last Name"
    },
    "extra_column_1": {
      "value": "Option 1",
      "trans": "dropdown"
    },
    "extra_column_2": {
      "value": "4",
      "trans": "Rating"
    },
    "extra_column_3": {
      "value": "0",
      "trans": "Checkbox"
    },
    "extra_column_4": {
      "value": "",
      "trans": "Group Title"
    },
    "created_by": {
      "value": "sh-themes",
      "trans": "Created By"
    },
    "creation_date": {
      "value": "2016-12-09 17:53:10",
      "trans": "Created"
    },
    "updated_by": {
      "value": "sh-themes",
      "trans": "Updated By"
    },
    "updated_date": {
      "value": "2017-01-02 18:08:43",
      "trans": "Updated"
    },
    "l_source": {
      "value": "Default",
      "trans": "Source"
    },
    "l_status": {
      "value": "Default",
      "trans": "Status"
    },
    "l_type": {
      "value": "Default",
      "trans": "Type"
    },
    "owned_by": {
      "value": "sh-themes",
      "trans": "Owned By"
    },
    "id": {
      "value": "2",
      "trans": "ID"
    },
    "small_image": {
      "value": "http://php56host.com/plugins/wp-content/uploads/shwcp/2-small_image.png",
      "trans": "small_image"
    },
    "lead_files": {
      "value": "",
      "trans": "lead_files"
    },
    "notes": [
      {
        "id": "3",
        "note_content": "<p>Note 3</p>",
        "date_added": "2016-12-11 21:17:16",
        "creator": "sh-themes",
        "date_updated": "0000-00-00 00:00:00"
      },
      {
        "id": "3",
        "note_content": "<p>Note 3</p>",
        "date_added": "2016-12-11 21:17:16",
        "creator": "scripthat",
        "date_updated": "0000-00-00 00:00:00"
      },
      {
        "id": "3",
        "note_content": "<p>Note 3</p>",
        "date_added": "2016-12-11 21:17:16",
        "creator": "jimmy",
        "date_updated": "0000-00-00 00:00:00"
      }
    ]
  },
  "database": ""
}

description: Returns a single entry from the database.  Field param must match the internal naming convention (e.g. first_name).  A valid request will give a response with the field original name containing value and translated field name.  Requests will go to the default database unless another is specified

Get Entry Fields – GET

endpoint: /wp-json/shwcp/v1/get-entry-fields/

params

  1. db (optional) – Database name

https://yoursite.com/wp-json/shwcp/v1/get-entry-fields

Successful Response

{
  "first_name": "First Name",
  "last_name": "Last Name",
  "extra_column_1": "dropdown",
  "extra_column_2": "Rating",
  "extra_column_3": "Checkbox",
  "extra_column_4": "Group Title",
  "created_by": "Created By",
  "creation_date": "Created",
  "updated_by": "Updated By",
  "updated_date": "Updated",
  "l_source": "Source",
  "l_status": "Status",
  "l_type": "Type",
  "owned_by": "Owned By",
  "id": "ID",
  "small_image": "Small Image",
  "lead_files": "Entry Files"
}

description: Returns the field name tranlations from the database.  This lists the field name translations with the actual field name mapped to the translated name.  Requests will go to the default database unless another is specified


List Databases – GET

/wp-json/shwcp/v1/list-dbs/

params

  1. none

https://yoursite.com/wp-json/shwcp/v1/list-dbs

successful response

{
  "databases": {
    "1": "Contacts 2",
    "2": "Contacts3",
    "default": "Main Contacts"
  }
}

description: Returns all current WP Contacts databases you have configured.  Default is the main/original database.


Delete Entry – POST

endpoint: /wp-json/shwcp/v1/delete-entry/

params

  1. db (optional) – Database name
  2. id – id of entry to delete

https://yoursite.com/wp-json/shwcp/v1/delete-entry?id=97

successful response

{
  "id": "97",
  "action": "delete",
  "status": 1
}

description:  Deletes WP Contacts entry by id.  Requests will go to the default database unless another is specified


Create Entry – POST

endpoint: /wp-json/shwcp/v1/create-entry/

params

  1. db (optional) – Database name
  2. fields (array) – Field name / value pairs

https://yoursite.com/wp-json/shwcp/v1/create-entry?fields[first_name]=James&fields[last_name]=Smith

successful response

{
  "id": 100,
  "action": "add",
  "fields": {
    "first_name": "James",
    "last_name": "Smith"
  }
}

description: Creates a new entry in WP Contacts with the matching fields sent in the fields param.  Note that field names need to be in the internal name format (e.g. first_name) not the translated name.  Requests will go to the default database unless another is specified


Update Entry – POST

endpoint: /wp-json/shwcp/v1/update-entry/

params

  1. db (optional) – Database name
  2. fields (array) – Field name / value pairs
  3. id – entry id to update

https://yoursite.com/wp-json/shwcp/v1/update-entry?id=100&fields[first_name]=Jim&fields[last_name]=Smith

successful response

{
  "id": 100,
  "action": "update",
  "fields": {
    "first_name": "Jim",
    "last_name": "Smith"
  }
}

description: Updates an existing entry with the fields given in the fields array.  Field names need to match internal naming convention (e.g. first_name).  Requests will go to the default database unless another is specified


User Permissions – POST

endpoint: /wp-json/shwcp/v1/user-perms/

params

  1. username – WordPress username
  2. access – choices are ‘none’,’readonly’,’ownleads’,’full’

https://yoursite.com/wp-json/shwcp/v1/user-perms?access=ownleads&username=scripthat

successful response

{
  "status": "Permission Set",
  "userID": 2
}

description: Updates or sets a User’s access for WP Contacts.  Note that the WordPress user needs to exist before their access can be set for WP Contacts.


Upload Entry File – POST

endpoint: /wp-json/shwcp/v1/create-entry-file/

params

  1. db (optional) – Database name
  2. id – entry id to upload file to

https://yoursite.com/wp-json/shwcp/v1/create-entry-file?id=5&db=contacts2

successful response

{
  "status": "File Uploaded",
  "name": "bobsfile.zip",
  "url": "http:/yoursite.com/wp-content/uploads/shwcp/bobsfile.zip",
  "type": "application/x-www-form-urlencoded"
}

description: Uploads a file to the corresponding entry.  Note that the Entry must exist before uploading a file and the http POST must use the correct convention to send the file for WordPress…Be sure you have the Content-Disposition set correctly along with the filename and include your file in the body as binary.  The example below is using basic authentication.

POST https://yoursite.com/wp-json/shwcp/v1/create-entry-file?id=2 HTTP/1.1
Host: yoursite.com
Authorization: Basic c2gtdGhlbWVzOnNsdWFnbvm9u
Content-Type: application/x-www-form-urlencoded
Content-Disposition: attachment; filename=bobsfile.zip

Update Entry Image – POST

endpoint: /wp-json/shwcp/v1/update-entry-image/

params

  1. db (optional) – Database name
  2. id – entry id to upload file to

https://yoursite.com/wp-json/shwcp/v1/update-entry-image?id=5&db=contacts2

successful response

{
  "status": "Image uploaded",
  "name": "/var/www/html/yoursite/wp-content/uploads/shwcp/2-small_image.jpg",
  "type": "application/x-www-form-urlencoded"
}

description: Uploads an image to the corresponding entry.  Note that the Entry must exist before uploading an image and the http POST must use the correct convention to send the file for WordPress…Be sure you have the Content-Disposition set correctly along with the filename and include your file in the body as binary.  The example below is using basic authentication.

POST https://yoursite.com/wp-json/shwcp/v1/update-entry-image?id=2 HTTP/1.1
Host: yoursite.com
Authorization: Basic c2gtdGhlbWVzOnNsdWFnbvm9u
Content-Type: application/x-www-form-urlencoded
Content-Disposition: attachment; filename=blog1.jpg

REST Hooks (9 total)

Below is a list of WordPress Custom Action Hooks we have integrated into WP Contacts and example implementations of these hooks.  These hooks are used to send information to other Applications from WP Contacts when an event occurs.

Entry Creation

Action Hook: wcp_add_entry_action

        add_action('wcp_add_entry_action', array($this, 'add_entry_hook'), 10, 2);

        /**
         * Add Entry Action
         */
        public function add_entry_hook($fields, $environment) {
            $url = "https://yoursite.com";
            $action = 'add_entry';
            $response = wp_remote_post($url,
                array(
                    'method' => 'POST',
                    'body' => array(
                        'action' => $action,
                        'fields' => $fields,
                        'environment' => $environment,
                    )
                )
            );
        }

Entry Updated

Action Hook: wcp_update_entry_action

        add_action('wcp_update_entry_action', array($this, 'update_entry_hook'), 10, 2);

        /**
         * Update Entry Action
         */
        public function update_entry_hook($fields, $environment) {
            $url = "https://yoursite.com";
            $action = 'update_entry';
            $response = wp_remote_post($url,
                array(
                    'method' => 'POST',
                    'body' => array(
                        'action' => $action,
                        'fields' => $fields,
                        'environment' => $environment,
                    )
                )
            );
        }

Entry Removed

Action Hook: wcp_del_entry_action

        add_action('wcp_del_entry_action', array($this, 'del_entry_hook'), 10, 2);

        /**
         * Delete Entry Action
         */
        public function del_entry_hook($fields, $environment) {
            $url = "https://yoursite.com";
            $action = 'delete_entry';
            $response = wp_remote_post($url,
                array(
                    'method' => 'POST',
                    'body' => array(
                        'action' => $action,
                        'fields' => $fields,
                        'environment' => $environment,
                    )
                )
            );
        }

Entry Note Created

Action Hook: wcp_addnote_entry_action

        add_action('wcp_addnote_entry_action', array($this, 'addnote_entry_hook'), 10, 4);

        /**
         * Add Entry Note Action
         */
        public function addnote_entry_hook($entry_id, $note, $note_id, $environment) {
            $url = "https://yoursite.com";
            $action = 'add_note';
            $response = wp_remote_post($url,
                array(
                    'method' => 'POST',
                    'body' => array(
                        'action' => $action,
                        'entry_id' => $entry_id,
                        'note' => $note,
                        'note_id' => $note_id,
                        'environment' => $environment,
                    )
                )
            );
        }

Entry Note Updated

Action Hook: wcp_updatenote_entry_action

        add_action('wcp_updatenote_entry_action', array($this, 'updatenote_entry_hook'), 10, 4);

        /**
         * Update Entry Note Action
         */
        public function updatenote_entry_hook($entry_id, $note, $note_id, $environment) {
            $url = "https://yoursite.com";
            $action = 'update_note';
            $response = wp_remote_post($url,
                array(
                    'method' => 'POST',
                    'body' => array(
                        'action' => $action,
                        'entry_id' => $entry_id,
                        'note' => $note,
                        'note_id' => $note_id,
                        'environment' => $environment,
                    )
                )
            );
        }


Entry Note Removed

Action Hook: wcp_delnote_entry_action

        add_action('wcp_delnote_entry_action', array($this, 'delnote_entry_hook'), 10, 4);

        /**
         * Delete Entry Note Action
         */
        public function delnote_entry_hook($entry_id, $note, $note_id, $environment) {
            $url = "https://yoursite.com";
            $action = 'delete_note';
            $response = wp_remote_post($url,
                array(
                    'method' => 'POST',
                    'body' => array(
                        'action' => $action,
                        'entry_id' => $entry_id,
                        'note' => $note,
                        'note_id' => $note_id,
                        'environment' => $environment,
                    )
                )
            );
        }

Entry Photo Changed

Action Hook: wcp_photo_entry_action

        add_action('wcp_photo_entry_action', array($this, 'photo_entry_hook'), 10, 3);

        /**
         * Entry Photo Action
         */
        public function photo_entry_hook($entry_id, $new_file_url, $environment) {
            $url = "https://yoursite.com";
            $action = 'add_photo_entry';
            $response = wp_remote_post($url,
                array(
                    'method' => 'POST',
                    'body' => array(
                        'action' => $action,
                        'entry_id' => $entry_id,
                        'new_file_url' => $new_file_url,
                        'environment' => $environment,
                    )
                )
            );
        }

Entry File Added

Action Hook: wcp_addfiles_entry_action

        add_action('wcp_addfiles_entry_action', array($this, 'addfiles_entry_hook'), 10, 3);

        /**
         * Add Entry Files Action
         */
        public function addfiles_entry_hook($entry_id, $file_data, $environment) {
            $url = "https://yoursite.com";
            $action = 'add_files_entry';
            $response = wp_remote_post($url,
                array(
                    'method' => 'POST',
                    'body' => array(
                        'action' => $action,
                        'entry_id' => $entry_id,
                        'file_data' => $file_data,
                        'environment' => $environment,
                    )
                )
            );
        }

Entry File Removed

Action Hook: wcp_delfiles_entry_action

        add_action('wcp_delfiles_entry_action', array($this, 'delfiles_entry_hook'), 10, 3);

        /**
         * Delete Entry Files Action
         */
        public function delfiles_entry_hook($entry_id, $file_data, $environment) {
            $url = "https://yoursite.com";
            $action = 'delete_files_entry';
            $response = wp_remote_post($url,
                array(
                    'method' => 'POST',
                    'body' => array(
                        'action' => $action,
                        'entry_id' => $entry_id,
                        'file_data' => $file_data,
                        'environment' => $environment,
                    )
                )
            );
        }

 

Developers - Hooks & Filters

With Version 2.0.8 and above we are including several custom filters that will allow you to modify the output on the front end without ever modifying the plugin itself.  If you are not familiar with WordPress filters and what they are, more information about filters can be found on the WordPress Codex.

The Custom Filter Hooks are as follows:

Specific Page Content Filters

wcp_all_leads_filter – The Home page content (all contacts)
wcp_events_filter – The Calendar view
wcp_logging_filter – The Logging Page
wcp_stats_filter – The Statistics Page
wcp_ie_filter – The Import and Export Page
wcp_individual_filter – The Individual View Page
wcp_sst_fields_filter – The Source Types and Status Page
wcp_edit_fields_filter – The Edit Fields Page
wcp_front_sort_filter – The Front Page Sorting Page
wcp_leads_filter – The Front Page Leads Array, containing all lead fields output on the front page

Page Section Filters

wcp_head_section_filter  – Head Section and Side menu
wcp_menu_links_filter – Side menu contents
wcp_bottom_section_filter – Bottom of page content (footer)


What this means to you is as a developer is that you can modify the output of any of these pages and sections before it’s output by creating your own functions to customize what’s displayed – and when there is a plugin update, you’ll still have your modifications because they won’t be in the plugin!

For theme developers and those who just want to make customizations you can add these functions right in your theme’s functions.php file (or anywhere else that makes sense).  Below are a couple of very simple examples to get you started in your own customizations.

/* Simply adding a header to the head output right after it */
function modify_wcp_head( $html ) {
    return $html . '<h2>Test Adding to Head section</h2>';
}
add_filter( 'wcp_head_section_filter', 'modify_wcp_head');

/* Add another link, or something else to the side menu */
function modify_menu_links( $html ) {
    return $html . '<li class="eventslink"><a href="#">New Link at the bottom <i class="wcp-md md-event-available"></i></a></li>';
}
add_filter( 'wcp_menu_links_filter', 'modify_menu_links');

/* Add your own content before the output on the default front page view */
function modify_all_leads( $html ) {
    return '<p>Hi There</p>' . $html;
}
add_filter( 'wcp_all_leads_filter', 'modify_all_leads');

If you would like to see us add other hooks to WP Contacts, send us a message through our support and let us know about it!

Currently we have direct form integration with 3 of the most popular form builders:

  1. Contact Form 7
  2. Gravity Forms
  3. Ninja Forms

If you would like to use other form builders with WP Contacts or integrate with WP Contacts with forms from other sites, you’ll want to get a hold of our Zapier extension to help you do these things and many more.  Check out our Zapier section to find out more.

Gravity Forms Integration

In order to capture form submission data into WP Contacts from a Gravity form you will simply tie fields together using the Admin Label (or for hidden fields you would use just the label) of a Gravity form field and give it the correct format and field to map to.  If you want to preset fields (which you most likely will) for submissions you can use hidden fields and insert a preset value to be populated in WP Contacts.

The naming convention is very important for the Admin Label as this will enable saving the contact into WP Contacts and decide what field will be populated from the form.  The naming convention that needs to be used under the Admin Label (or Label for hidden fields) of the Gravity form is in the following format:

wpcontacts-fieldname

so for example let’s say you were going to map the Gravity form text field for Name to the first name field of WP Contacts.

First, open up WP Contacts and go to Manage FIelds here you will see your fields with the database field name as the field label, this is what you use to map the fields.

Next, go to your form and use the naming convention of wpcontacts-first_name in the Admin Field Label of the form field under the Advanced Tab for the field to map.

note: If using a hidden field, you will only have the option to set the label since there is no Admin Label for hidden fields, just put your wpcontacts-fieldname there instead.

Do this for each field you want your Gravity form to send to WP Contacts when the form is submitted.  Remember to use hidden fields for preset values and to use the correct naming convention for the Admin Field Label.  You can map to any of the WP Contacts fields you would like except for the following as these are automatically generated upon creation…

  • creation_date
  • created_by
  • updated_date
  • updated_by
  • id

Optional – You can optionally set the database to be used (if you have more than 1 database created in WP Contacts) by giving a hidden field the label of wpdatabasemap and a preset value of the database name by setting the Default Value to the database name.  Otherwise, entries will go to your default database.

Ninja Forms Integration

In order to capture form submission data into WP Contacts from a Ninja form you will simply tie fields together using the Admin Label of a Ninja form field and give it the correct format and field to map to.  If you want to preset fields (which you most likely will) for submissions you can use hidden fields and insert a preset value to be populated in WP Contacts.

The naming convention is very important for the Admin Label as this will enable saving the contact into WP Contacts and decide what field will be populated from the form.  The naming convention that needs to be used under the Admin Label of the Ninja form is in the following format:

wpcontacts-fieldname

so for example let’s say you were going to map the Ninja form text field for Name to the first name field of WP Contacts..

  1.  Open up WP Contacts and go to Manage FIelds here you will see your fields with the database field name as the field label, this is what you use to map the fields.

2.  Go to your form and use the naming convention of wpcontacts-first_name in the Admin Label of the form field under Advanced Settings for the field to map.

3.  Do this for each field you want your Ninja form to send to WP Contacts when the form is submitted.  Remember to use hidden fields for preset values and to use the correct naming convention for the Admin Label.  You can map to any of the WP Contacts fields you would like except for the following as these are automatically generated upon creation…

  • creation_date
  • created_by
  • updated_date
  • updated_by
  • id

4.  Optional – You can optionally set the database to be used (if you have more than 1 database created in WP Contacts) by giving a hidden field the admin label of wpdatabasemap and a preset value of the database name by setting the Default Value to use the database name.  Otherwise, entries will go to your default database.

Contact Form 7 Integration

We have integrated some lead capturing capabilities from one of the most popular free contact forms (contact form 7) to put the contact right into your WP Contacts database.  This opens up all new possibilities for how you use WP Contacts.  The method we use is very flexible, giving you the opportunity to associate your form fields with almost any field you create in the database, assign it to someone and preset some values for the form capture!

Please be sure to read all instructions carefully so that you create your lead capture correctly

Of course with Contact Form 7 you can have multiple forms that serve different purposes and each form can capture data differently than the rest.

One thing of note – you’ll need to pay extra special attention to your form field names and column names that you’ll be mapping to or you won’t get the data you want.

If you are familiar with Contact Form 7, each form you create has several shortcode tags used for various fields.  We’ve added a custom hidden field that maps fields you’ve set and lets you pre-set other values that you want to be pre-defined for the entry to be added to WP Contacts database.

WP Contacts shortcode usage in Contact Form 7

below is an example of our shortcode added to a Contact Form 7 contact form along with the standard fields:

 

<p>Your Name (required)<br />
[text* your-name wcp_test] </p>

<p>Your Email (required)<br />
[email* your-email] </p>

<p>Subject<br />
[text your-subject] </p>

<p>Your Message<br />
[textarea your-message] </p>

<p>[submit "Send"]</p>

[wpcontacts]
wpfieldmap=your-name:first_name
wpfieldmap=your-email:extra_column_6
wpfieldmap=your-message:extra_column_4
owned_by=someguy
l_source=New Field
l_status=Complete
l_type=Seller
wpdatabasemap=Contacts
wpcontact_uploads
[/wpcontacts]
 

Our shortcode is the entire wpcontacts shortcode block shown above.  Each entry is separated by a line ending (return) and the format is important! .  Within the shortcode you will see wpfieldmap entries and other entries.  The wpfieldmap entries are set up in a format of:

wpfieldmap=form-field-name:wpcontacts-column-name

With these entries you are mapping the Contact Form 7 field name to the WP Contacts column name, be sure to use the equal sign (=) and colon to format the entry.

All of the entries below the wpfieldmap entries are directly set fields by you that you want to set for your contact using the WP Contacts column name on the left and the value on the right.  A handful of builtin fields do not need to be set by you as they are set at the time of creation, these fields are id, creation_date, updated_date, created_by, and updated_by so please do not try to set these as that can confuse things.  Any other field that exists or that you create can be set or mapped.

  1. Enclose the fields with the wpcontacts shortcode container ([wpcontacts]…[/wpcontacts]
  2. Put 1 entry per line
  3. Fields filled out in the form use the wpfieldmap format to map the Contact Form 7 field name to the WP Contacts column
  4. Fields you want to pre set for the entry use the WP Contacts fieldname=value format
  5. If your form names change or you delete a field in the database, you’ll need to update the wpcontacts shortcode with the new information as well.

Valid WP Contacts Field names for use

  • owned_by (the name of the individual you want the entry assigned to, defaults to none)
  • l_source  (if not set defaults to the default source)
  • l_status  (if not set defaults to the default status)
  • l_type  (if not set defaults to the default type)
  • first_name
  • last_name
  • extra_column_x (custom fields you’ve created where x is the numbered custom field)
  • wpdatabasemap Optionally assign the database by name that the entry should populate into.  Otherwise the entry will go to your default database.  Be sure to map the fields according to the correct database you are using!
  • wpcontact_uploads (version 3.0.6 and above) optionally add this entry to enable file uploads to map to WP Contacts from Contact Form 7.  You must add this if you want your Contact Form 7 file uploads to be saved in WP Contacts.

Referencing WP Contacts Field Names

In order to reference the correct field names to use to associate the form with WP Contacts use your Manage Fields page in WP Contacts.  On this page you can reference the field label text of the field you wish to use.  In the scenario shown below the email address field is associated with extra_column_6 .

Once you have the fields set up correctly you’ll start receiving form submission entries from Contact Form 7 in WP Contacts!

WP Contacts Translation using the included .pot file

The following information will show you how to translate the plugin into your language.

  1. Create a po file for your language, for example shwcp-de_DE.po
  2. Copy all text from provided plugin pot file (shwcp.pot) into your po file
  3. Edit the po file with poedit http://www.poedit.net/
  4. Create the mo file
  5. Name your translation files with WP Contacts text domain e.g. shwcp-de_DE.po and shwcp-de_DE.mo and save in the plugin lang directory.
  6. Edit wp-config.php file in your installation and set WPLANG so it matches your languages: define(‘WPLANG’, ‘de_DE’);
    or if WordPress version 4+ just select your language in Admin under Settings -> General -> Site Language.

Plugin should now display all messages in your language.

— BACKUP YOUR LANGUAGE PO/MO FILES  —

On a plugin update, language files are *NOT* preserved.
You will need to manually restore your po/mo files right after the update.
Also, Thank you in advance for sending us a copy of your translation files, we’ll add them into future updates!  This will help to keep you from having to maintain these files on plugin updates

You can send them to translate@sh-themes.com

In this section we will include videos to show you how to use WP Contacts in various ways.

 Installing WP Contacts – This video shows you how to get up and running installing the WP Contacts plugin through uploading to yourWordPress site.

Adding A New Field – This video shows you how quick it is to add a new field and change where it displays on the Main page and on the individual contact page.

Adding A New Contact – This video shows how to quickly add a new contact, change the image and manage the different contact areas.

 

Below are a few of the more common issues we see and how to resolve them.

Unable to interact with the front end

Although rare, you may come across logging into the front end of WP Contacts after setting up the backend only to find you are unable to Add new entries, edit or save anything.  Or, all of the styles are not what’s shown in the demo.  These issues are indicative of a plugin or theme adding javascript that is throwing errors on the page, or injecting styles on the page.

To verify, you can use Firebug or Chrome Inspector to see if there are any Javascript errors on page load.  You can also try switching themes (to something like twentysixteen) and disabling other plugins to see if it clears up.

Themes and Plugins these days are supposed to follow certain standards for WordPress and the cause of this issue every time has been someone not ‘enqueuing’ their scripts and styles the correct way.  Take a look at the following articles for more information

The good news is most theme and plugin authors want to follow WordPress standards and will take care of that if they are made aware of the problem.

If in the case you must use a theme or plugin that is conflicting and you cannot resolve it any other way, here are some things you can do:

Some of our users have reported using the Multiple Themes plugin successfully to switch themes for the Contacts page https://wordpress.org/plugins/jonradio-multiple-themes/

If you have a plugin that you know is the cause of a conflict (by testing disabling them one by one mentioned above) and you MUST use this plugin…you can try using the Plugin Organizer plugin to disable the conflicting plugin only on the WP Contacts page -> https://wordpress.org/plugins/plugin-organizer

We include the troubleshooting backend setting (at the bottom of your Default database -> Main Settings tab) that will accomplish the below adjustment for you.  All you need to do is set it to true and save.

Working around other plugins / theme javascript errors

We enqueue our scripts in the footer to optimize page loading, you can change all scripts to load in the header to avoid conflicts as a last resort.

Error 200 on file imports

This message is typically related to PHP limitations on your server (upload size, memory limit etc.) or the permissions in the WordPress upload directory, possibly even a missing PHP dependency.  Since it is a generic response from the server, you need to see what the underlying issue is that needs to be changed.

  • First of all check your server error log.  This will tell you what the problem is.  You can also go to the WP Contacts Site Information tab in the backend settings to see what some of the current PHP values are set to for a reference as well.
  • Make sure your WordPress upload directory has the correct permissions to write files – a quick test for this is to try adding an image to your Library through the WordPress admin.  If you can’t upload an image, you’ll need to make changes to your WordPress installation to allow access.

Login with undefined buttons

If you login to WP Contacts and when the request goes through the page reloads with another login form and undefined buttons like in the image below…

This indicates that you have some form of caching enabled (Either in a plugin or a server setting).  You will want to disable caching for WP Contacts to prevent this behavior.  You’ll know if by reloading the page after login (ctrl + R or refresh button) and the page shows up correctly.


Version 3.1.4 - 10-5-2017
     - Greek language file added - Thanks to George Konstantinidis!

Version 3.1.3 - 9-25-2017
     - Bug fix for custom roles small screens adding entries

Version 3.1.2 - 9-22-2017
     - Bug fix for ie11 with javascript error thrown for matching parens

Version 3.1.1 - 9-01-2017
     - Bug fix for add new entries permission where radio allowed both being checked

Version 3.1.0 - 7-19-2017
     - Fixes to work with Contact Form 7 version 4.8 changes

Version 3.0.9 - 7-19-2017
     - Bug fix dropdown sort ordering on frontpage

Version 3.0.8 - 7-1-2017
     - Added RTL support for RTL languages

Version 3.0.7 - 6-1-2017
     - Minor fixes to custom and access roles
     - Fix for using older versions of Contact Form 7

Version 3.0.6 - 4-13-2017
     - New feature! Dynamic permissions
     - SST migrated to dropdowns, all can be managed under Field Management section
     - New feature! Individual page layout management
     - New feature! Dynamic statistics match dropdowns created
     - Reorganized field edit page to match field capabilities
     - Initial default settings saved on install for quick access
     - Export "current view" added to front page for easily exporting filtered views
     - Date only field type added
     - Contact Form 7 file upload mapping to WP Contacts now available
     - Print css added to individual page for better printing

Version 3.0.5 - 2-17-2017
     - New Feature - dynamic filters on front page, use your dropdowns now as well
     - New Feature - Export filtering capability added
     - New Feature - Entry files preview capability added to front page
     - UI improvements all around

Version 3.0.3 - 01-23-2017
     - Fix for CF7 deprecated notice
     - Fix for php version 7 and break command on excel export
     - Fix for custom javascript applying to correct database
     - Year dropdown selector for datetime field types added.

Version 3.0.1 - 01-14-2017
     - WP Contacts RESTful API integration!

Version 2.1.2 - 12-9-2016
     - Fix for individual lead display for Publicly accessible set up and  
       non-logged-in users

Version 2.1.1 - 11-17-2016
     - Updates for WordPress version 4.7 - fixes template selection for page in
       this version.

Version 2.1.0 - 11-11-2016
    - Changed a template generating class name that was conflicting with an automotive theme
    - Added uri encoding to Search for special character search support

Version 2.0.9 - 10-30-2016
    - Bug Fix - Multiple custom events not showing up on same day
    - Changed search feature to paginated results instead of displaying all at once for main results and logs

Version 2.0.8 - 10-26-2016
    - Added custom filter hooks to adjust output for all frontend pages and sections
    - Minor styling fixes and adjustments

Version 2.0.7 - 10-21-2016
    - Added support for Ninja Forms v3+ since they've updated some of their hooks and processes

Version 2.0.6 - 10-3-2016
    - Fix for multiple dropdowns with same selections importing bug

Version 2.0.5 - 8-15-2016
    - Fix for multisite notes (using base_prefix instead of prefix for users table)

Version 2.0.4 - 5-05ish-2016
    - Fixed bug with database selection if using default db and assigning it
    - Added user id to body class for Custom CSS targetting
    - Several minor improvements
    - New! Dropdown fields added as a new field type

Version 2.0.3 - 4-29-2016
    - Fixed file upload url reporting incorrect path for non-default database
    - Added jpeg extension support for main image upload
    - New Spanish translation files - Thanks to Ruben Villar

Version 2.0.2 - 3-19-2016
    - Fixed non-default database reset folder recreation
    - Fixed small bug on mobile search overlapping first entry
    - Fixed several small styling issues
    - Added move our scripts to header capability for troubleshooting

Version 2.0.1 - 2-12-2016
    - Fields can now be set to be required inputs in forms
    - Date fields can now be set to use WordPress custom date and time formats by enabling in backend settings
    - Search added to individual entry view
    - Speed improvements
    - DB versioning
    - Fix to daily stats ending on current day now
    - Many other minor improvements

Version 2.0.0 - 1-18-2016
    - Big update - Many new features and improvements!
    - Unlimited number of separate databases per installation - each with their own access and settings.
    - Ninja Forms Integration
    - Gravity Forms Integration
    - Calendaring, Events, and Notifications functionality now included
    - Mailchimp API export direct
    - Custom JS now available
    - Custom Links for Frontend menu
    - New Fields - star rating, date time, checkbox, Grouping Titles
    - Edit Notes capability
    - Search All Fields ability
    - Sticky quick edit bar
    - Many styling enhancements and layout fixes (Big thanks to Roman!)
    - Select and delete multiple entries at a time
    - Search all fields feature
    - Many new CSS targetting classes added (For even more customization)
    - Date and Time picker date fields added
	
Version 1.2.6 - 11-25-2015
    - Contact Form 7 radio and checkbox field type mapping support added

Version 1.2.5 - 11-2-2015
    - WordPress 4.4 modifications

Version 1.2.4 - 10-17-2015
    - Contact Form 7 integration, add contacts directly from contact form submissions!

Version 1.2.3 - 10-12-2015
    - Default sorting view customization setting added

Version 1.2.2 - 10-8-2015
    - New field type Google map address link
    - Fixed Front page sorting issue which could be triggered when managing fields

Version 1.2.1 - 10-5-2015 
    - New feature - Added several different field types for custom fields!
    - Several styling fixes for small screens

Version 1.2.0 - 9-16-2015 German translation files added (thank you Kristina!)

Version 1.1.9 - 8-25-2015 Missing translation strings added

Version 1.1.8 - 8-24-2015 Dropdown default fix, disable transfer contacts capability added for "Manage Own Leads Only" role

Version 1.1.7 - 8-7-2015 Using WP Contacts as Front page fix search parameters

Version 1.1.6 - 7-29-2015 Multisite ready, dynamic CSS classes added to Main View fields for custom CSS targetting

Version 1.1.5 - 7-26-2015 Spanish Translation files Included, several bug fixes

Version 1.1.4 - 7-26-2015 Backups, Restore Backups, Reset Database capabilities added

Version 1.1.3 - 7-5-2015 Clear logging capability added, style fixes

Version 1.1.2 - 6-30-2015 Several styling fixes & more statistics views

Version 1.1.0 - Initial Release