Skip to content

Instantly share code, notes, and snippets.

@Kennyboy7
Kennyboy7 / gw-gravity-forms-manual-entries.php
Created February 21, 2023 20:45 — forked from spivurno/gw-gravity-forms-manual-entries.php
Gravity Wiz // Gravity Forms // Manual Entries
<?php
/**
* WARNING! THIS SNIPPET MAY BE OUTDATED.
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library:
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-manual-entries.php
*/
/**
* Gravity Wiz // Gravity Forms // Manual Entries
*
* Create entries manually for Gravity Forms. Adds an "Add New" button next to the page title on all entry-related pages.
<?php
/*
** CUSTOM LOOPER FOR PRO THEME
** 1. Set "Looper Provider" as "Custom" and the hook as "get_my_query"
** 2. Add below function to functions.php in child theme
** 3. Set Params via JSON in Pro. Takes "post_type" and "tax_query" in format here:
{
"post_type": ["post", "tv_show"],
"tax_query": {
@Kennyboy7
Kennyboy7 / acf_repeater_shortcode.php
Created January 24, 2020 18:21 — forked from FranciscoG/acf_repeater_shortcode.php
An Advanced Custom Fields shortcode that allows to loop through a field with a repeater. This only handles simple cases, it can't handle nested repeater fields
<?php
/**
* ACF Pro repeater field shortcode
*
* I created this shortcode function because it didn't exist and it was being requested by others
* I originally posted it here: https://support.advancedcustomfields.com/forums/topic/repeater-field-shortcode/
*
* @attr {string} field - (Required) the name of the field that contains a repeater sub group
* @attr {string} sub_fields - (Required) a comma separated list of sub field names that are part of the field repeater group
* @attr {string} post_id - (Optional) Specific post ID where your value was entered. Defaults to current post ID (not required). This can also be options / taxonomies / users / etc