Example #1
0
							
							<h3 class="h2"><a href="<?php 
        the_permalink();
        ?>
" rel="bookmark" title="<?php 
        the_title_attribute();
        ?>
"><?php 
        the_title();
        ?>
</a></h3>
							
							
							<?php 
        // get the ID for the assignment this belongs to
        $aid = get_assignment_id_from_terms(get_the_ID());
        // make a link string
        $assignment_str = $aid ? '<a href="' . get_permalink($aid) . '">' . get_the_title($aid) . '</a>' : '';
        ?>

							<p class="meta"><?php 
        _e("Added", "wpbootstrap");
        ?>
 <time datetime="<?php 
        echo the_time('Y-m-j');
        ?>
" pubdate><?php 
        the_date();
        ?>
</time> <?php 
        _e("by", "wpbootstrap");
Example #2
0
<?php

// check if this is a syndicated external link
$the_real_permalink = get_post_meta($post->ID, 'syndication_permalink', true);
if ($the_real_permalink) {
    // let's go to the link instead of doing anything else
    wp_redirect($the_real_permalink);
    exit;
}
// We got a real thing to show, get some meta data first
$exampleURL = get_post_meta($post->ID, 'example_url', $single = true);
$exampleTwitter = get_post_meta($post->ID, 'submitter_twitter', $single = true);
$exampleSource = get_post_meta($post->ID, 'syndication_source', $single = true);
// get the assignment ID and permalink this example is a response to
$assignment_id = get_assignment_id_from_terms($post->ID);
$assignment_link = get_permalink($assignment_id);
get_header();
?>

<div id="content" class="clearfix row">

	<div id="main" class="col-sm-12 clearfix" role="main">	
		<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
			
			
			<article id="post-<?php 
        the_ID();
Example #3
0
function bank106_custom_examples_column($column, $post_id)
{
    switch ($column) {
        case 'thing':
            // get the ID for the assignment
            $aid = get_assignment_id_from_terms($post_id);
            if ($aid) {
                echo '<a href="' . get_permalink($aid) . '">' . get_the_title($aid) . '</a>';
            } else {
                echo '--';
            }
            break;
    }
}