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 | |
| // app/Controllers/App.php | |
| /** | |
| * Set up header media from ACF or featured image | |
| */ | |
| public function headermedia() | |
| { | |
| // Initialize the return array |
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 | |
| // Add facets | |
| add_filter('facetwp_facets', function () { | |
| // Video category checkboxes | |
| $facets[] = array( | |
| 'label' => 'Video Category', | |
| 'name' => 'video_category', | |
| 'type' => 'radio', | |
| "source" => "tax/category", | |
| "parent_term" => "", |
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 | |
| namespace App; | |
| add_filter( 'facetwp_pager_html', function( $output, $params ) { | |
| $output = '<nav aria-label="Resources Pagination"><ul class="pagination mt-5">'; | |
| $page = $params['page']; | |
| $i = 1; | |
| $total_pages = $params['total_pages']; | |
| $limit = ($total_pages >= 5) ? 3 : $total_pages; | |
| $prev_disabled = ($params['page'] <= 1) ? 'disabled' : ''; | |
| $output .= '<li class="page-item ' . $prev_disabled . '"><a class="facetwp-page page-link" data-page="' . ($page - 1) . '">Prev</a></li>'; |
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 | |
| /** | |
| * Set excerpt from ACF field | |
| */ | |
| add_action('acf/save_post', function($post_id) { | |
| $post_excerpt = get_field( 'short_description', $post_id ); | |
| if ( ( !empty( $post_id ) ) AND ( $post_excerpt ) ) { |
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 | |
| /** | |
| * Set "Featured Image" from ACF field | |
| */ | |
| add_action('acf/save_post', function($post_id) { | |
| $value = get_field('video_cover_image', $post_id); | |
| if($value != ''){ | |
| add_post_meta($post_id, '_thumbnail_id', $value); |
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 | |
| namespace App; | |
| /** | |
| * WP Job Manager application form using Formidable or Formidable Pro | |
| * Version: 1.0 | |
| * Requires: WP Job Manager, Formidable, Advanced Custom Fields Pro | |
| * Author: Michael W. Delaney | |
| */ |
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
| {{-- | |
| Template Name: Events | |
| --}} | |
| @extends('layouts.app') | |
| @section('content') | |
| <div id="tribe-events-pg-template"> | |
| <?php tribe_events_before_html(); ?> | |
| <?php tribe_get_view(); ?> |
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 | |
| namespace App; | |
| /** | |
| * Advanced Custom Fields drop-in functionality for Sage 9 | |
| * Version: 1.0 | |
| * Author: Michael W. Delaney | |
| */ | |