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 | |
/* | |
Template Name:FAQ Page | |
*/ | |
//Thanks to WPBeaches for this code: https://wpbeaches.com/creating-a-faq-page-in-wordpress-using-acf-and-jquery/ | |
add_action( 'genesis_entry_content', 'wpb_faq_repeater_page', 10 );//Position FAQs after post content | |
function wpb_faq_repeater_page () { | |
//My ACF Fields for reference | |
//faqs - field group |
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
//* Format specific sections in a Gravity Form - code based on | |
// http://www.jordancrown.com/multi-column-gravity-forms/ and https://sridharkatakam.com/splitting-gravity-forms-fields-into-2-columns/ | |
function gform_format_sections( $content, $field, $value, $lead_id, $form_id ) { | |
if( !IS_ADMIN ) { // only perform on the front end | |
// target section breaks | |
if( $field['type'] == 'section' ) { | |
$form = RGFormsModel::get_form_meta( $form_id, true ); | |
// check for the presence of formatted section class |
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 | |
/** | |
* Brazosport Chamber | |
* Description: This page pulls links from other pages on the site and displays them in one list. | |
* @package Brazosport Chamber | |
* @author Dorian Speed, Up to Speed | |
* @license GPL-2.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
<?php | |
/* | |
This code will make members signing up for membership level #1 authors and make them subscribers when they cancel. | |
*/ | |
function my_pmpro_after_change_membership_level($level_id, $user_id) | |
{ | |
if($level_id == 1) | |
{ | |
//New member of level #1. If they are a subscriber, make them an author. | |
$wp_user_object = new WP_User($user_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 | |
/** | |
* Template Name: Update Profile | |
* This template displays a form for updating the user's profile on the front end | |
* Based on https://daronspence.wordpress.com/2014/09/29/front-facing-user-profile-editing-customization-with-acf/ | |
*/ | |
acf_form_head(); | |
get_header(); |
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
/** Add post image above post title */ | |
add_action( 'genesis_before_post_title', 'decor_post_image' ); | |
function decor_post_image() { | |
if ( is_page() ) return; | |
else | |
if( in_array( 'teaser', get_post_class() ) && $image = genesis_get_image( 'format=url&size=grid-image' )) | |
{printf( '<a href="%s" rel="bookmark" class="post-photo"><span class="grid-date">%s</span><img src="%s" alt="%s" /></a>', get_permalink(), do_shortcode( '<em>[post_date format="j"]</em>[post_date format="F Y"]' ), $image, the_title_attribute( 'echo=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
<? php | |
/** | |
* Grid Content | |
* Change the number of words in excerpt if in the grid loop | |
*/ | |
function be_grid_content() { | |
// First, we make sure we're in the grid loop. | |
if( ! apply_filters( 'is_genesis_grid_loop', false ) ) | |
return; |
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
/** | |
* Grid Content | |
* Change the number of words in excerpt if in the grid loop | |
*/ | |
function be_grid_content() { | |
// First, we make sure we're in the grid loop. | |
if( ! apply_filters( 'is_genesis_grid_loop', false ) ) | |
return; | |
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 | |
/* | |
* Template Name: Question | |
* This template displays Question Details | |
*/ | |
add_action('genesis_after_post_content', 'child_get_questions_field'); //display meta-box content after the content | |
//Function to show the content | |
function child_get_questions_field() { |