How to create a WordPress plugin for your web app - Deepstash
How to create a WordPress plugin for your web app

How to create a WordPress plugin for your web app

Curated from: medium.com

Ideas, facts & insights covering these topics:

4 ideas

·

2 reads

Explore the World's Best Ideas

Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.

Step 1: Find your web app

Here’s a quick briefing of Feedier if you’ve never heard of it:

  • It’s a feedback collector tool, using surveys to understand your users
  • It’s very flexible
  • It’s free!
  • Has a good API (very important here)
  • Has an in-site widget (very important here)
  • Lets you reward your customers
  • Lets you create conditional questions
  • Has a complete analytic report dashboard
  • Lets you manage feedback individually

2

1 read

Step 2: Setup our plugin and its architecture

WordPress plugin are by design very simple. Our plugin will only need two files.

  • feedier.php : main plugin’s PHP file.
  • assets/js/admin.js : JavaScript script to save the options using Ajax.

2

1 read

Step 3: Create our admin page

In our class’ constructor, let’s register three new actions which are required to add an admin page on WordPress:

  • addAdminMenu will add a new page in the WordPress left menu. There will be also a callback to another method containing the page’s content.
  • storeAdminData will be called whenever the user clicks the “Save settings” button.
  • Addadminscripts will register a new Javascript file to our Wordpress Admin in order to save the form’s data.

2

0 reads

Step 4: Insert the dynamic code automatically into our pages

Now that we have our options saved, we can create a dynamic widget that will depend on the options set by the user through our admin page. We need to create a new method to our Plugin that will print this code depending on the variables set by the user. To do this, we’ll hook our method to the Wp_Footer action. 

2

0 reads

IDEAS CURATED BY

stepstri

Psychotherapist

Stephen Strickland's ideas are part of this journey:

Ultimate Guide to Reducing Churn

Learn more about startup with this collection

How to analyze churn data and make data-driven decisions

The importance of customer feedback

How to improve customer experience

Related collections

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates