Giter Club home page Giter Club logo

jdm-custom-cta's Introduction

JDM Custom CTA

This simple, unbranded WordPress plugin adds Call-to-Action (CTA) fields to the editor and allows theme developers to display it using simple functions. More information can be found on JDM Labs.

alt tag

Description

There are many cases when theme developers may want the ability to add a call-to-action (or CTA) button to their theme that's easily editable from the WordPress backend. Originally created for a client, this reusable plugin does just that.

The plugin does NOT enqueue any resources or make any significant change to the speed of the site. It simply adds this handy functionality using a custom post meta box and give theme developers a new function they can use in their themes.

Installation

  1. Install the plugin, and the updater - tutorial here for using GitHub Updater
  2. Activate the plugin
  3. Go to one of your Pages or "Add New Page"
  4. Look for the new post meta box titled Call to Action (CTA) under the WYSIWYG editor
  5. Enter the URL where you want the CTA to link to, starting with http://
  6. Enter the text you want the button to say, for example: “Click Here for Awesome Stuff”
  7. Publish or Update the page

NOTE: That just sets the post meta for us to use our handy functions. You still have to add the actual functions to show the information in your theme. See a full example on the plugin site for details on how to display your new Call-to-Action button in your themes.

Frequently Asked Questions

Why isn't my CTA links showing up? You need to make sure you add the PHP code to your theme in the location you want it. See a full example on the plugin site for details on how to display your new Call-to-Action button in your themes.

How do I remove the CTA button? Easy. Just delete the link in the page editor and click "Update." If there is no link for the CTA to link to, the have_cta() function will return false. That's true even if the CTA button text is still there.

Why does my CTA button always say "Click Here" Oh, that's the default. If you don't set a value in the CTA Button Text, it'll default to "Click Here." We know that's a terrible Call-to-Action. That's why it's the default--to encourage you to set it to something relevant.

Changelog

0.9

  • ALPHA testing complete.
  • Small edits to source code and readme file(s)

0.5

  • Enabled GitHub Updater
  • Small edits to source code and readme file(s)

0.2

  • Reusable plugin created.
  • Version updated.

0.1

  • Initial Release.

jdm-custom-cta's People

Contributors

jdmdigital avatar

Stargazers

 avatar

Watchers

 avatar  avatar

jdm-custom-cta's Issues

CTA Section

Created a new branch for this. A CTA button is cool, but having a full CTA section is cooler. This also opens the door for displaying A/B versions of the same CTA for testing and optimization purposes.

Better Validation

It would be great if we can get this plugin to be a little smarter. We're thinking better validation, like:

  • Show nothing if URL and/or button text are not entered (defaults to nothing)
  • Can detect what CSS framework someone may be using (bootstrap, etc.)
  • Settings page with detailed instructions on how to setup this up in themes

Release on WordPress.org

We'll want to release this simple plugin on the WordPress.org repo. The review process is slow, so we've already enabled GitHub Updater so BETA testers can still receive automatic updates.

Add Asset Images

We'll want to add images for when we actually release this to the WordPress.org SVN. Here's what we've got so far...
cta-banner
cta-banner-big
cta-thumbnail
screenshot-1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.