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 | |
global $post; | |
$get_posts = tribe_get_events(array('posts_per_page'=>-3,) ); | |
foreach($get_posts as $post) { setup_postdata($post); | |
?> | |
<?php if ( has_post_thumbnail() ) { ?> | |
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
// Grab our gulp packages | |
var gulp = require('gulp'), | |
autoprefixer = require('autoprefixer'), | |
gulpLoadPlugins = require('gulp-load-plugins'), | |
yargs = require('yargs'), | |
browserSync = require('browser-sync').create(); | |
const $ = gulpLoadPlugins(); | |
const wpPath = "./wp-content/themes/*YOURTHEME*"; | |
const PRODUCTION = !!(yargs.argv.production); |
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 to function.php | |
function taxo_primary_term_name($taxo){ | |
$wpseo_primary_term = new WPSEO_Primary_Term($taxo, get_the_ID()); | |
$wpseo_primary_term = $wpseo_primary_term->get_primary_term(); | |
$cat = get_the_category(); | |
if ( $wpseo_primary_term ) { // Return yoast primary category | |
return $wpseo_primary_term = get_term($wpseo_primary_term)->name; | |
} |