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
<header>Header</header> | |
<nav>Nav</nav> | |
<article>Article</article> | |
<footer>Footer</footer> |
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 ACF Fields to Keyword evaluation for Yoast SEO Plugin | |
* @link https://imperativeideas.com/making-custom-fields-work-yoast-wordpress-seo/ | |
*/ | |
if ( is_admin() && defined('WPSEO_VERSION') ) { // check to make sure we aren't on the front end | |
add_filter('wpseo_pre_analysis_post_content', 'add_acf_to_yoast'); |
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 template for displaying all pages. | |
* | |
* This is the template that displays all pages by default. | |
* Please note that this is the WordPress construct of pages | |
* and that other 'pages' on your WordPress site will use a | |
* different template. | |
* | |
* Additionally this template will try to retrieve the any |
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
if ( ! function_exists( 'cpt_archives_settings' ) ) : | |
add_action( 'pre_get_posts', 'themename_cpt_archives_settings' ); | |
// Pass the $query argument into the action. | |
function themename_cpt_archives_settings( $query ) { | |
// Define the context. | |
// Not on dashboard pages when inside the main query only on cpt archives. | |
if( ! is_admin() && $query->is_main_query() && is_post_type_archive( 'cpt_name_goes_here' ) ) { |
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
<div class="row"> | |
<?php | |
// ACF_REPEATER_FIELD_NAME Repeater | |
if( get_field( 'ACF_REPEATER_FIELD_NAME' ) ): | |
// Get number of items from the result | |
$numItems = sizeof( get_field( 'ACF_REPEATER_FIELD_NAME' ) ); | |
// Divied by 2 and round up to distribute evenly between the columns | |
$itemsPerColumn = round( $numItems/2 ); | |
// Intialize an iterator for displacing an odd number of results |
NewerOlder