However! After some messing around I’ve determined the code is calling the posts perfectly! It just doesn’t like the <div class="portfolio-wrapper">
class for some reason. Although this is the class that works on all other pages to order the post, it just doesn’t want to be told what to do on this page and comes out blank. If I change the div class, all the posts show up perfectly but without the css to put them in columns.
Sooooooo…..I posted in the theme support but… you might be able to help me here.
I’m starting to wonder if maybe this custom page template I made simply isn’t calling for the necessary jetpack script to apply the css or functions that style the content???
Maybe I need to add something to these rules on the inc/jetpack.php file for this template?
Thoughts?
/**
* Load Jetpack scripts.
*/
function illustratr_jetpack_scripts() {
if ( is_post_type_archive( 'jetpack-portfolio' ) || is_tax( 'jetpack-portfolio-type' ) || is_tax( 'jetpack-portfolio-tag' ) || is_page_template( 'page-templates/portfolio-page.php' ) ) {
wp_enqueue_script( 'illustratr-portfolio', get_template_directory_uri() . '/js/portfolio.js', array( 'jquery', 'masonry' ), '20140325', true );
}
if ( is_singular() && 'jetpack-portfolio' == get_post_type() ) {
wp_enqueue_script( 'illustratr-portfolio-single', get_template_directory_uri() . '/js/portfolio-single.js', array( 'jquery', 'underscore' ), '20140328', true );
}
if ( is_page_template( 'page-templates/portfolio-page.php' ) ) {
wp_enqueue_script( 'illustratr-portfolio-page', get_template_directory_uri() . '/js/portfolio-page.js', array( 'jquery' ), '20140402', true );
}
}
add_action( 'wp_enqueue_scripts', 'illustratr_jetpack_scripts' );
]]>
My custom template just wasn’t getting the necessary script!
I injected it right into the template…
<!-- CALLING FOR THE SCRIPT -->
wp_enqueue_script( 'illustratr-portfolio', get_template_directory_uri() . '/js/portfolio.js', array( 'jquery', 'masonry' ), '20140325', true );
Damn it feels good to be a gangster.
]]>