function alt_highlight_slider() { $highlights_number = 0; $args = array('meta_query' => array(array('key' => 'On Front Page')), 'post_type' => array('post', 'page'), 'orderby' => 'id', 'order' => 'ASC', 'post_status' => 'publish'); $ofp = new WP_Query($args); $htmlstr = ''; if ($ofp->have_posts()) { $htmlstr .= '<div id="highlights" class="carousel slide">'; $htmlstr .= '<ol class="carousel-indicators">'; while ($ofp->have_posts()) { $ofp->the_post(); $htmlstr .= '<li data-target="#highlights" data-slide-to=' . $highlights_number++ . '></li>'; } $htmlstr .= '</ol>'; $htmlstr .= '<div class="carousel-inner">'; while ($ofp->have_posts()) { $ofp->the_post(); $htmlstr .= '<div class="item">'; $url = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full', true); $htmlstr .= '<div class="fill" style="background-image:url(' . $url[0] . ')">'; $htmlstr .= '<div class="text-center">'; $htmlstr .= '<div class="container">'; $htmlstr .= '<div class="row vh-45">'; $htmlstr .= '<div class="row-height">'; $htmlstr .= '<div class="col-xs-12 col-height col-middle">'; $htmlstr .= '<div class="inside">'; $htmlstr .= '<div class="content">'; $htmlstr .= '<h2 class="text-xxl">' . showMeta('Post Sub Caption') . '</h2>'; $htmlstr .= '<h3 class="text-xxl">' . showMeta('Post Sub Caption') . '</h2>'; $htmlstr .= '</div>'; $htmlstr .= '</div>'; $htmlstr .= '</div>'; $htmlstr .= '</div>'; $htmlstr .= '</div>'; $htmlstr .= '<div class="row">'; $htmlstr .= '<div class="row-height">'; $htmlstr .= '<div class="col-xs-12 col-height col-bottom">'; $htmlstr .= '<div class="inside">'; $htmlstr .= '<div class="content">'; if (showMeta('Post Sub Caption') == 'The Nation\'s Oldest Academic Honor Society') { /* $htmlstr .= '<a href="#1" class="text-lg">'; $htmlstr .= '<p class="btn btn-primary text-lg uppercase">welcome</p>'; $htmlstr .= '<br/>'; $htmlstr .= '<i class="text-lg fa fa-angle-down"></i>'; $htmlstr .= '</a>'; */ } else { $htmlstr .= '<a href="' . get_the_permalink($ofp->ID) . '" class="text-lg">'; $htmlstr .= '<h3>' . get_the_excerpt($ofp->ID) . '</h3>'; $htmlstr .= '</a>'; } $htmlstr .= '</div>'; $htmlstr .= '</div>'; $htmlstr .= '</div>'; $htmlstr .= '</div>'; $htmlstr .= '</div>'; $htmlstr .= '</div> '; $htmlstr .= '</div>'; $htmlstr .= '</div>'; $htmlstr .= '</div>'; } $htmlstr .= '</div>'; $htmlstr .= '<!-- Controls -->'; $htmlstr .= '<a class="left carousel-control" href="#highlights" data-slide="prev">'; $htmlstr .= '<span class="icon-prev"></span>'; $htmlstr .= '</a>'; $htmlstr .= '<a class="right carousel-control" href="#highlights" data-slide="next">'; $htmlstr .= '<span class="icon-next"></span>'; $htmlstr .= '</a>'; $htmlstr .= '</div>'; } else { $htmlstr = ' <div class="fill" style="background-image:url(' . bloginfo('template_directory') . '/images/fpstock.jpg\')">'; $htmlstr = ' <div class="col-xs-12 text-center">'; $htmlstr = ' <div class="vh-45"></div>'; $htmlstr = ' <a href="#1" class="text-lg">'; $htmlstr = ' <p class="btn btn-primary text-lg uppercase">welcome</p>'; $htmlstr = ' <br/>'; $htmlstr = ' <i class="text-lg fa fa-angle-down"></i>'; $htmlstr = ' </a>'; $htmlstr = ' </div>'; $htmlstr = ' </div>'; } add_action('wp_footer', 'highlightsJs'); wp_reset_postdata(); return $htmlstr; }
<div class="inside"> <div class="content"> <p class="text-xl"> <!-- ... --></p> </div> </div> </div> </div> </div> <div class="row"> <div class="row-height"> <div class="col-xs-12 col-height col-middle"> <div class="inside"> <div class="content"> <div class="padding"> <?php echo showMeta('Post Content Two'); ?> </div> </div> </div> </div> </div> </div> <div class="row"> <div class="row-height"> <div class="col-xs-12 col-height col-middle force-fluid-left"> <div class="inside"> <div class="content"> <p class="text-sm"> <!-- ... --></p> </div> </div>
<?php if (has_post_thumbnail()) { $thumb_id = get_post_thumbnail_id(); $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail-size', true); $thumb_url = $thumb_url_array[0]; } ?> <div class="cover rel" style="height:200px;min-height:100%;background-image:url(<?php echo $thumb_url; ?> )"> <h2 class="uppercase text-center" style="position: absolute;top: 50%;left: 25%;transform: translate(-50%, -50%);"> <?php echo showMeta('Post Header Caption'); ?> </h2> </div> </div> </div> </div> <?php $args = array('post_type' => 'page', 'posts_per_page' => -1, 'post_parent' => $post->ID, 'order' => 'ASC', 'orderby' => 'menu_order', 'post_status' => 'publish'); $p = new WP_Query($args); ?> <?php if ($p->have_posts()) { $post_counter = 0; while ($p->have_posts()) { $p->the_post();
</div> <div class="col-xs-12"> <p class="text-center"><?php echo the_title(); ?> </p> </div> <div class="col-xs-12"> <p class="text-center"><?php echo showMeta('University Attended'); ?> </p> </div> <div class="col-xs-12"> <p class="text-center"><?php echo showMeta('Year of Graduation'); ?> </p> </div> </div> </a> </div> <?php } } else { ?> <div class="row"> <div class="row-height"> <div class="col-xs-12 col-height col-middle"> <div class="inside">
<div class="container-fluid nopadding"> <div class="row-fluid nopadding"> <?php $abt_args = array('pagename' => 'about'); $p = new WP_Query($abt_args); ?> <div class="col-xs-12"> <?php if ($p->have_posts()) { while ($p->have_posts()) { $p->the_post(); ?> <?php echo showMeta('Post Title'); ?> <?php } } else { ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?> </p> <?php } ?> <?php wp_reset_postdata(); ?>
<!-- Excerpt from About Page --> <div class="container"> <div class="row"> <div id="1" class="col-xs-12 nopadding"> <?php $abt_args = array('pagename' => 'about'); $p = new WP_Query($abt_args); ?> <?php if ( $p->have_posts() ) : while ( $p->have_posts() ) : $p->the_post(); ?> <div class="row"> <div class="row-height"> <div class="col-xs-6 col-height"> <div class="inside"> <div class="content"> <h2><?php echo showMeta('Post Caption'); ?></h2> <?php the_excerpt(); ?> </div> </div> </div> <div class="col-xs-6 col-height col-middle text-center"> <div class="inside"> <div class="content"> <div class="btn btn-primary outline"> <a href="<?php the_permalink();?>"> Learn More <i class="icon-circle-right"></i> </a> </div> </div> </div> </div>
?> <!-- About Page - Post Header Caption --> <div class="row"> <div class="row-height"> <div class="col-xs-2 force-fluid-left col-height"> <div class="inside"> <div class="content"> <!-- ... --> </div> </div> </div> <div class="col-xs-8 col-height col-middle"> <div class="inside"> <div class="content"> <p class="text-left text-xl uppercase"><?php echo showMeta('Post Footer Caption'); ?> </p> </div> </div> </div> </div> </div> <?php } } else { ?> <div class="row"> <div class="row-height"> <div class="col-xs-12 col-height col-middle">