Snippets

 
 
 

Find a collection of custom WordPress Core, Advanced Custom Fields and Gravity Forms Snippets here. Use the tabs to navigate between the sections and accordions to open or hide the specific snippet.


Image field, set CSS background.

This snippets assumes that ACF field returns image id and sets a background of a specified div element to the image.

(ACFRPW) Load BBPress Topics from a specific forum

This snippet will let one limit bbPress recent Topics to only those who have a specific Forum parent.


Pre submission handler. Register new user.

A sample code, which fires before the form was submitted and creates a new user account.

Validation handler. Register new user.

A sample code, which fires during the form validation.

Custom Checkbox Input HTML

This snippet of code modifies GF input field and creates a custom checkbox for both admin and Front End view. It can be used in case of any custom CSS for which unordered list default is hard to comply with, e.g. mobile structure.


Custom Plugin Action.

A sample custom plugin action, with do_action() and add_action() calls. A full post explaining the use case can be found here.

Custom MediaElement

The snippets below will do the following:

  • Deregister the MediaElement script
  • Give the new MediaElement script (which can be placed within the theme .js files or placed in theme’s header.

A full post explaining this use case can be found here.


Have you tried Editr WP plugin yet?
It lets you create your own interactive embeds!