mcjh button shortcode

mcjh button shortcode | Marcus C. J. Hartmann

Description

Create nice call-to-action Buttons (cta buttons) in 12 predefined colors or whole hexadecimalcode, using own labelling and individual target-URLs. A special settings-page offers an easy-to-use shortcode-generator with preview feature.

  • Define custom button text
  • Set a custom text color
  • Define custom link
  • Define a custom link title
  • Define, if target should be opened in a new window/tab or the current one
  • Use 12 predefined colors or custom hexadecimal color code
  • Define a javascript onclick action
  • Use Placeholders for page-id, button-id, target-url, text and current page as arguments in javascript functions
  • Define inline button behavior
  • Add custom css
  • Activate/deactivate rounded corners
  • Make clicks trackable
  • Usable in Widgets, Content and theme-parts
  • Easy to use Shortcode Generator in backend with color picker

QuickDocs Shortcode

  • text: defines the text of the button
  • link: the link your button points to, must start with “http://” to work properly
  • color: the color of your button
  • title: the mouse over title
  • onclick: an onclick action to be executed before switching to the given link
  • target: defines the target window of the link
  • style: defines the intext behavior for the button (float, block etc)
  • rounded: defines, if button corners are rounded, or not
  • tcolor: defines the text color by hexdec code
  • css: custom css for buttons

QuickDocs Javascript Placeholders

These placeholders only work in the “onlick” attribute and can be used as button-specific arguments in javacript functions.

They generally would be used like this: onclick="your_awesome_js_function({buttonid},{link},{pageurl})"

  • {link} will be replaced by the button-link
  • {pageid} will be replaced by the page id that contains this button
  • {pageurl} will be replaced by the page url that contains this button
  • {text} will be replaced by the button text
  • {buttonid} will be replaced by the button id

Important: Don’t use quotes in combination with the placeholders, since they are rendered with quotes automatically!

Example shortcode
[createButton text=”my text” link=”http://google.de” color=”gold” title=”my awesome button” onclick=”alert({url})” target=”_blank” style=”blockleft” rounded=”false” tcolor=”#123″ css=”a{min-height:300px;}” ]

Installation

  1. Upload folder mcjh-buttons to the /wp-content/plugins/ directory
  2. Activate the plugin through the Plugins menu in WordPress
  3. Ready. Now create your first button with [createButton]! See more Information in the Settings-Page

Plugin author

Marcus C. J. Hartmann

Plugin official website address

https://wordpress.org/plugins/mcjh-button-shortcode/
If you encounter problems in using the mcjh button shortcode plugin, you can comment below, and I will try my best to help you solve the problem

Leave a Comment

Your email address will not be published.