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 | |
$_terms = get_terms( array('TAXONOMY-NAME') ); | |
foreach ($_terms as $term) : | |
$term_slug = $term->slug; | |
$_posts = new WP_Query( array( | |
'post_type' => 'POST-TYPE-NAME', | |
'posts_per_page' => 200, | |
'tax_query' => 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
<?php $paged=(get_query_var('paged')) ? get_query_var('paged') : 1; query_posts(array('post_type'=>'slides', 'showposts'=>-1, 'posts_per_page' => 1, 'paged' => $paged )); ?> | |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> | |
<?php | |
$image = get_post_meta($post->ID, 'slide_image', true); | |
?> | |
<div class="item"><img src="<?php echo $image; ?>" alt="<?php the_title(); ?>" title="" /></div> | |
<?php endwhile; endif; ?> |
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 if (have_posts()) : while (have_posts()) : the_post(); ?> | |
<?php | |
$title = get_post_meta($post->ID, 'page_title', true); | |
?> | |
<?php endwhile; endif; ?> |
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 POST TYPES ///////////////////////// | |
/////////////////////////////////////////////////////////////// | |
require_once(TEMPLATEPATH . '/post-types/slides.php'); | |
// require_once(TEMPLATEPATH . '/post-types/another-post-type.php'); | |
add_action("admin_init", "admin_init"); | |
function admin_init(){ } |
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 | |
$slides = new_cmb2_box(array( | |
'id' => 'slides_metabox', | |
'title' => 'Slides', | |
'object_types' => array( | |
'slides', | |
) , // Post type | |
'context' => 'normal', | |
'priority' => 'high', | |
'show_names' => true, |
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
/////////////////////////////////////////////////////////////////// | |
// RESIZE IMAGES ON THE FLY | |
/////////////////////////////////////////////////////////////////// | |
require_once(TEMPLATEPATH . '/functions/resize.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 $image_id = jess_get_attachment_id_by_url( $image ); ?> |
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
//////////////////////////////////////////////////////////////////// | |
// LOGIN LOGO | |
//////////////////////////////////////////////////////////////////// | |
function my_login_logo() { ?> | |
<style type="text/css"> | |
.login h1 { | |
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo.png); | |
padding-bottom: 30px; | |
background-repeat: no-repeat; | |
background-position: top center; |
OlderNewer