This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//My ACF Fields for reference | |
//testimonials - field group | |
//testimonial - sub-field | |
//testimonial_header - sub-field | |
//First Repeater Row in Array | |
$rows = get_field( 'testimonials', 348 );// grab all rows from page ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Wiz // Gravity Forms // Submit to Access | |
* | |
* Require that a form be submitted before a post or page can be accessed. | |
* | |
* @version 1.7 | |
* @author David Smith <[email protected]> | |
* @license GPL-2.0+ | |
* @link https://gravitywiz.com/submit-gravity-form-access-content/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Wiz // Gravity Forms // Redirect if Email Exists | |
* | |
* Redirect to a specified URL if the the submitted email address matches an existing user. | |
* | |
* Note: Does not work with AJAX-enabled forms. | |
* | |
* @version 0.1 | |
* @author David Smith <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Wiz // Gravity Forms // User Registration // Skip Registration if Email Exists | |
* | |
* If submitted email is already registered, skip registration. | |
* | |
* @version 0.4 | |
* @author David Smith <[email protected]> | |
* @license GPL-2.0+ | |
* @link http://gravitywiz.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There is no specific template for child pages, but you can do this pretty easily with the get_template_part() function. | |
First create a file called "content-child.php". | |
Second create a file called "content.php". | |
Next, inside of page.php, place this: | |
<?php | |
if( $post->post_parent !== 0 ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*----------------------------------------------*/ | |
/* Image Field | |
/*----------------------------------------------*/ | |
/* Return value: Attachment ID */ | |
<?php if(get_field('logo')): ?> | |
<?php | |
$attachment_id = get_field('logo'); | |
$size = "vendor-logo"; // (thumbnail, medium, large, full or custom size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Paginate Advanced Custom Field repeater | |
*/ | |
if( get_query_var('page') ) { | |
$page = get_query_var( 'page' ); | |
} else { | |
$page = 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Forms Bootstrap Styles | |
* | |
* Applies bootstrap classes to various common field types. | |
* Requires Bootstrap to be in use by the theme. | |
* | |
* Using this function allows use of Gravity Forms default CSS | |
* in conjuction with Bootstrap (benefit for fields types such as Address). | |
* |
NewerOlder