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_action('init', 'tessak22_register_custom_post_types', 0); | |
function tessak22_register_custom_post_types() | |
{ | |
$arr_custom_post_type_options = array( | |
/* | |
array( | |
'label' => 'lowercase_name' // ** 20 char max, no spaces or caps | |
'singlar' => 'Human-Readable Item' // singular name | |
'plural' => 'Human-Readable Items' // plural name | |
'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'post-formats') |
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 | |
$today = current_time('Ymd'); | |
$args = array( | |
'post_type' => 'events', | |
'posts_per_page' => '20', | |
'meta_key' => 'speaking_date', | |
'order' => 'ASC', | |
'orderby' => 'meta_value', | |
'meta_query' => array( | |
array( |
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
//Used in Template | |
<?php if(get_field('banner_image')): ?> | |
<div class="banner-image"><img class="img-responsive" src="<?php the_field('banner_image'); ?>"></div> | |
<?php endif; ?> | |
//Used in custom post types | |
<?php |
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 | |
// loop over the ACF flexible fields for this page / post | |
while ( the_flexible_field('page_builder') ) { | |
// load the layout from the block folder | |
get_template_part( 'blocks/'. get_row_layout() ); | |
} ?> |
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 //each page builder has its own section | |
get_template_part('inc', 'page-builder'); | |
?> |
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 | |
$title = get_sub_field('title'); | |
$content = get_sub_field('content'); | |
?> | |
<section class="content-block centered_paragraph_with_title flex"> | |
<div class="content col-sm-10 col-sm-offset-1 text-center"> | |
<?php if ( $title ): ?> | |
<h3><?php echo $title; ?></h3> |
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
// Custom Post Types | |
add_action('init', 'tessak22_register_custom_post_types', 0); | |
function tessak22_register_custom_post_types() | |
{ | |
$arr_custom_post_type_options = array( | |
/* | |
array( | |
'label' => 'lowercase_name' // ** 20 char max, no spaces or caps | |
'singlar' => 'Human-Readable Item' // singular name | |
'plural' => 'Human-Readable Items' // plural name |
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: Dogs | |
* | |
* @link https://codex.wordpress.org/Template_Hierarchy | |
* | |
* @package WordPress | |
* @subpackage Twenty_Seventeen | |
* @since 1.0 | |
* @version 1.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
/** | |
* Add ACF Options for Theme Settings | |
*/ | |
if( function_exists('acf_add_options_page') ) { | |
acf_add_options_page(array( | |
'page_title' => 'Theme Settings', | |
'menu_title' => 'Theme Settings', | |
'menu_slug' => 'theme-general-settings', | |
'capability' => 'edit_posts', |
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
/** | |
* Register hero block | |
*/ | |
add_action('acf/init', 'hero'); | |
function hero() { | |
// check function exists | |
if( function_exists('acf_register_block') ) { | |
// register a hero block |
OlderNewer