Forum Replies Created

Viewing 7 replies - 31 through 37 (of 37 total)
  • Same issue here, any fixes yet. I’m using it with twentyeleven and everything is working great except that my top nav disappears on the calendar/events list page.

    @ramon Kaes, @bruce…What exactly was the fix that worked concerning the url?

    Thanks

    Thanks David for taking a look. I basically just created a page template…page-about.php and added it to your theme folder, and pointed my posts to it in the dashboard settings:
    http://pastebin.com/kYXibm9L

    The only other change I made to the folder was to register the post type, so your functions file ended up looking like this:
    http://pastebin.com/9yCs7QxP

    I have been tinkering with this and just can’t for the life of me figure it out. Really appreciate and help.
    -Lee

    This is a custom loop right?

    <?php while ( have_posts() ) : the_post();
    $args = array(
    'post_type' => 'books',
    'posts_per_page' => 4
    );
    $loop = new WP_Query( $args );
    
    while ( $loop->have_posts() ) : $loop->the_post();
     the_title('<h2 class="books">','</h2>');
    echo '<div class="one">';
    
    the_post_thumbnail('thumbnail', array('class' => 'alignleft'));
    echo the_excerpt();
    
    echo '</div>';
    endwhile; // end of the loop. ?>

    Firstly, thanks for this great resource. I have a question regarding pulling in custom post types that I’ve created into a page template. And actually I’ve tried both content-about.php and about-page.php. Here’s what I’ve done:

    In your index.php I have changed this piece:
    <?php get_template_part( ‘content’, ‘about’ ); ?>

    and in content-about.php in the post types part I have changed this piece:
    <?php if ( ‘post’ == get_post_type(‘myposttype’) ) : ?>
    <div class=”entry-meta”>
    <?php twentyeleven_posted_on(); ?>
    </div><!– .entry-meta –>
    <?php endif; ?>

    ‘myposttype’ is registered in the functions.php file correctly. I’ve had it working on 1 column but now I need the 2-col.

    My post type is not displaying at all but regular post types are displaying nicely in the 2-col format.

    I would really appreciate your help. Thanks.

    Forum: Fixing WordPress
    In reply to: 2 column layout
    Thread Starter lee718

    (@lee718)

    Hi alchymyth,

    thanks for your reply. You saw my other question and code(that you linked to) related to digital raindrops post on their site. I tried to follow that in my custom post type in a page template file and it just stacked the posts to the left instead of in a two column. Should I be using a mycontent-index.php instead of mypage.php? Doing something wrong here. Any ideas?

    I would love to get this code to work. Appreciate your help.

    Thread Starter lee718

    (@lee718)

    I’ve since tried to place the two-columns using shortcodes. Right now the posts are in half columns but stacking on left instead of left/right, so in one column but 50% of page basically. Can anyone help me with this? I would really appreciate it. Here’s the code in my custom post in template child page:

    <?php while ( have_posts() ) : the_post();
    $args = array( 'post_type' => 'dozen_runners', 'posts_per_page' => 2 );
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post();
    the_title('<h2 class="post-title">','</h2>');
    echo '<div class="one_half">';
    the_post_thumbnail('thumbnail', array('class' => 'alignleft'));
    		    echo do_shortcode(wpautop(wptexturize(get_the_excerpt())));
    echo '</div>';
    endwhile; // end of the loop. ?>

    and in functions.php:

    function webtreats_one_third( $atts, $content = null ) {
    return '<div class="one_third">' . do_shortcode($content) . '</div>';
    }
    function webtreats_one_half( $atts, $content = null ) {
    		   return '<div class="one_half">' . do_shortcode($content) . '</div>';
    		}
    add_shortcode('one_half', 'webtreats_one_half');
    
    function webtreats_one_half_last( $atts, $content = null ) {
    return '<div class="one_half last">' . do_shortcode($content) . '</div><div class="clearboth"></div>';
    }
    add_shortcode('one_half_last', 'webtreats_one_half_last');
    Thread Starter lee718

    (@lee718)

    by the way, if anyone knows another way to do 2 column with css, I’d be interested in knowing. I tried it this way too but it just went one column to the left without the right column.
    Thanks

Viewing 7 replies - 31 through 37 (of 37 total)