This file contains hidden or 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
/** | |
* Jump to the first error after submission | |
* | |
* @param $form | |
* @return mixed | |
*/ | |
function gf_scroll_to_first_error_focus( $form ) { | |
?> | |
<script type="text/javascript"> | |
if( window['jQuery'] ) { |
This file contains hidden or 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 | |
/** | |
* Template Name: Sitemap | |
*/ | |
get_header(); ?> | |
<?php if ($GLOBALS['$show_titles']){ echo '- Sitemap'; } ?> | |
<section id="primary" class="content-area col-sm-12 col-md-12 col-lg-8"> | |
<div class="content-module"> | |
<div class="content-item"> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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). | |
* |
This file contains hidden or 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 | |
/** | |
* The SEO Framework + ACF flexible content integration | |
* TSF will look at the excerpt and then the content to generate the default meta description. | |
* If both of those are empty, this code looks for ACF flexible modules to get it from. | |
* // TODO: Make this work with archives as well as posts | |
* @param $description | |
* @param $args | |
* | |
* @return mixed|string |