Side by side blog posts that are tied together

I’m looking for a way to have the screen split with side-by-side blog posts that are tied together. My client has her Grandather’s travel dairies and wants to posts the entries. The originals are in German but she also has English translations. So what I’d like is column A has an English post and column B has the German post. Anyone know if there is a plugin or easy-ish way to do this? Maybe something to do with tying the post dates together?

Related posts

Leave a Reply

3 comments

  1. A very simple solution: Add a second editor field to the post editor, and use the meta field content in a filter on the_content.

    add_filter( 'the_content', 'wpse_77811_extra_content' );
    
    function wpse_77811_extra_content( $content )
    {
        return $content . get_post_meta($post->ID, '_t5_extra_box', TRUE );
    }
    
  2. Is this the only solution you’re open to? I ask because the easiest option would be to have post in one language, then have the other language within a customized “Read More” link (i.e. “Read in English” or “Read the original diary entry in German!”)

    (Here’s the WP link to customizing the read more: http://codex.wordpress.org/Customizing_the_Read_More)

    If you have your heart set on two columns, then you will have to edit the post entry php file and the css as well (to make sure that the columns stack on smaller screens so your site stays responsive in that respect).

  3. You can do this in different ways. If you are looking for a quick way to achieve this; you can download and install the post-to-post create all the posts twice and then in your templates create a custom query to retrieve the connected posts. ie.

        <?php
        // Normal post query
        $query = new WP_Query( 'posts_per_page=1' );
        if ( $query->have_posts() ) :
        ?>
            <div class="english-post">
                <h3><?php the_title(); ?></h3>
                <div><?php the_content(); ?></div>
            </div>
        <?php
        endif;
        wp_reset_postdata();
        ?>
    
    
        <?php
        // Connected posts
        $connected = new WP_Query( array(
          'connected_type' => 'posts_to_pages',
          'connected_items' => get_queried_object(),
          'nopaging' => true,
        ) );
    
        // Display connected posts
        if ( $connected->have_posts() ) :
        ?>
            <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
                <div class="german-post">
                    <h3><?php the_title(); ?></h3>
                    <div><?php the_content(); ?></div>
                </div>
            <?php endwhile; ?>
        <?php 
        endif;
        wp_reset_postdata();
        ?>
    

    Or you can use a real translation plugin like http://wpml.org/ and create two queries similar to the ones above, but with the proper syntax explained on the wpml site.