function pixelhappy_post_meta()
{
    if (is_page()) {
        return;
    }
    // don't do post-meta on pages
    genesis_post_meta();
}
Example #2
0
/**
 * Default post meta output.
 *
 * @since  1.0.0
 *
 * @param  object  $post     The current post object.
 * @param  object  $context  The global post object.
 * @param  array   $args     The instance args.
 */
function mm_posts_output_post_meta($post, $context, $args)
{
    $custom_output = apply_filters('mm_posts_post_meta', '', $post, $context, $args);
    if ('' !== $custom_output) {
        echo $custom_output;
        return;
    }
    echo '<div class="entry-meta-wrap">';
    // If the site is running Genesis, use the Genesis post meta.
    if (function_exists('genesis_post_meta')) {
        genesis_post_meta();
    } else {
        $cats = get_the_category_list();
        $tags = get_the_tag_list('<ul class="post-tags"><li>', '</li><li>', '</li></ul>');
        echo '<div class="entry-meta">';
        if ($cats) {
            echo $cats;
        }
        if ($tags) {
            echo $tags;
        }
        echo '</div>';
    }
    echo '</div>';
}
Example #3
0
/**
* Wrapper for the Genesis post meta function which has no method to return.
*
* @since  0.1.0
* @access public
* @return string
*/
function genlib_get_post_meta()
{
    ob_start();
    genesis_post_meta();
    return ob_get_clean();
}
function sbg_staff_grid()
{
    if ($image = genesis_get_image('format=url&size=staff-member')) {
        printf('<div class="staff-featured-image"><a class="thickbox"' . 'title="' . get_the_title() . '"' . ' href="#TB_inline?height=300&width=600&inlineId=%s"><img src="%s" alt="%s" /></a></div>', sbg_thethickboxcontent(), $image, the_title_attribute('echo=0'));
        echo '<div class="title-meta">';
        genesis_do_post_title();
        genesis_post_meta();
        echo '</div>';
    } else {
        echo '<div class="staff-featured-image">';
        echo '<img src="' . plugins_url('/img/sampleimg.jpg', dirname(dirname(__FILE__))) . '"/>';
        echo '<div class="title-meta">';
        genesis_do_post_title();
        genesis_post_meta();
        echo '</div>';
        echo '</div>';
    }
}
function sbg_add_main_shortcode($atts)
{
    ob_start();
    $atts = extract(shortcode_atts(array('columns' => '4', 'position' => '', 'posts' => 20, 'linkto' => 'lightbox', 'lightboxheight' => '300', 'lightboxwidth' => '600', 'displayposition' => 'true', 'order' => 'ASC', 'orderby' => 'title'), $atts));
    // define query parameters based on attributes
    $options = array('post_type' => 'staff-member', 'order' => $atts['order'], 'orderby' => $atts['orderby'], 'posts_per_page' => $posts, 'staff-position' => $position);
    $custom_query = new WP_Query($options);
    $numberofcolumns = $columns;
    $column_classes = array('', '', 'one-half', 'one-third', 'one-fourth', 'one-fifth', 'one-sixth');
    $classes[] = $column_classes[$numberofcolumns];
    while ($custom_query->have_posts()) {
        $custom_query->the_post();
        // add 'first' to the array containing the classes if this is the first item overall or if the current item number divided by the number of columns has a remainder of 0
        if (0 == $custom_query->current_post || 0 == $custom_query->current_post % $numberofcolumns) {
            $classes[] = 'first';
        } else {
            if (($key = array_search('first', $classes)) !== false) {
                unset($classes[$key]);
            }
        }
        echo '<article ';
        post_class($classes, $custom_query->post->ID);
        echo '>';
        echo '<div class="staff-featured-image">';
        add_thickbox();
        echo '<a title="' . get_the_title($custom_query->post->ID) . '"';
        // this is the default behavior, and it is also used if linkto="lightbox"
        if ($linkto == 'lightbox') {
            echo 'class="thickbox" href="#TB_inline?height=' . $lightboxheight . '&width=' . $lightboxwidth . '&inlineId=thestaffcontent' . $custom_query->post->ID . '">';
        } elseif ($linkto == 'single') {
            echo ' href="' . get_the_permalink($custom_query->post->ID) . '">';
        } elseif ($linkto == 'none') {
            echo ' href="#">';
        }
        // plugins_url( '/img/sampleimg.jpg', __FILE__ )
        if (has_post_thumbnail($custom_query->post->ID)) {
            echo get_the_post_thumbnail($custom_query->post->ID, 'staff-member', '');
        } else {
            echo '<img src="' . plugins_url('/img/sampleimg.jpg', dirname(__FILE__)) . '"/>';
        }
        echo '</a>';
        echo '</div>';
        echo '<div style="display:none;" id="thestaffcontent' . $custom_query->post->ID . '">';
        the_content($custom_query->post->ID);
        echo '</div>';
        echo '<div class="title-meta">';
        echo '<h2 class="entry-title">';
        echo '<a title="' . get_the_title($custom_query->post->ID) . '"';
        // this is the default behavior, and it is also used if linkto="lightbox"
        if ($linkto == 'lightbox') {
            echo 'class="thickbox" href="#TB_inline?height=' . $lightboxheight . '&width=' . $lightboxwidth . '&inlineId=thestaffcontent' . $custom_query->post->ID . '">';
        } elseif ($linkto == 'single') {
            echo ' href="' . get_the_permalink($custom_query->post->ID) . '">';
        } elseif ($linkto == 'none') {
            echo ' href="#">';
        }
        the_title();
        echo '</a>';
        echo '</h2>';
        if ($displayposition == 'true') {
            $terms = get_the_terms($custom_query->post->ID, 'staff-position');
            if (!empty($terms)) {
                foreach ($terms as $term) {
                    echo '<p class="entry-meta"><span class="entry_terms">', $term->name, '</span></p>';
                }
            }
        }
        if ($displayposition == 'linked') {
            genesis_post_meta($custom_query->post->ID);
        }
        if ($displayposition == 'false') {
            // silence is golden...
        }
        $text = get_post_meta($custom_query->post->ID, '_sbg_phone', true);
        if (!empty($text)) {
            echo $text;
        }
        echo '</div>';
        echo '<div class="sbg_contactinfo">';
        $text = get_post_meta($custom_query->post->ID, '_sbg_email', true);
        if (!empty($text)) {
            $link = '<a href="mailto:' . $text . '">' . '<span class="genericon genericon-mail"></span>' . '</a>';
            echo $link;
        }
        $text = get_post_meta($custom_query->post->ID, '_sbg_facebook', true);
        if (!empty($text)) {
            $link = '<a target="_blank" href="' . $text . '">' . '<span class="genericon genericon-facebook"></span>' . '</a>';
            echo $link;
        }
        $text = get_post_meta($custom_query->post->ID, '_sbg_twitter', true);
        if (!empty($text)) {
            $link = '<a target="_blank" href="' . $text . '">' . '<span class="genericon genericon-twitter"></span>' . '</a>';
            echo $link;
        }
        echo '</div>';
        edit_post_link();
        echo '</article>';
    }
    echo '<div class="sbg_clear"></div>';
    wp_reset_postdata();
    wp_reset_query();
    $theshortcode = ob_get_clean();
    $theshortcode = do_shortcode($theshortcode);
    return $theshortcode;
}
Example #6
0
/**
 * Wrapper for the Genesis post meta function which has no method to return.
 *
 * @since  0.1.0
 * @access public
 * @return string
 */
function foxtrot_get_post_meta()
{
    ob_start();
    genesis_post_meta();
    return ob_get_clean();
}
Example #7
0
function sk_masonry_entry_footer()
{
    genesis_post_info();
    genesis_post_meta();
}