Hallo,
ich bastel aktuell an meiner Seite. Ich bin absoluter Anfänger und verbringe manchmal Stunden, bis ich etwas so hinbekommen habe, wie ich möchte. Diesmal komme ich einfach nicht weiter. Ich habe ein vorgegebenes Seiten-Template bearbeitet, um dort Inhalte eines anderen Typs anzeigen lassen zu können. Es ist alles so, wie ich es haben möchte, allerdings hätte ich jetzt gerne noch jeweils zwei Beiträge nebeneinander angezeigt, statt alle untereinander.
Es handelt sich um folgende Seite:
http://www.adventuregamestv.com/video/
Der Code der .php Datei:
PHP
<?php
/**
* Template Name: Portfolio 2 columns
*/
get_header(); ?>
<div class="container_12 primary_content_wrap clearfix">
<div id="content" class="grid_12">
<?php include_once (TEMPLATEPATH . '/title.php');?>
<?php global $more; $more = 0;?>
<?php $values = get_post_custom_values("category-include"); $cat=$values[0]; ?>
<?php $catinclude = 'portfolio_category='. $cat ;?>
<?php $temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query(); ?>
<?php $wp_query->query("post_type=video&". $catinclude ."&paged=".$paged.'&showposts=8'); ?>
<?php if ( ! have_posts() ) : ?>
<div id="post-0" class="post error404 not-found">
<h1 class="entry-title"><?php _e( 'Not Found', 'theme1519' ); ?></h1>
<div class="entry-content">
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'theme1519' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</div><!-- #post-0 -->
<?php endif; ?>
<div id="gallery" class="two_columns">
<ul class="video">
<?php
$i=1;
if ( have_posts() ) while ( have_posts() ) : the_post();
if(($i%2) == 0){ $addclass = "nomargin"; }
?>
<?php
$custom = get_post_custom($post->ID);
$lightbox = $custom["lightbox-url"][0];
?>
<li class="<?php echo $addclass; ?>">
<?php if($lightbox!=""){ ?>
<a class="image-wrap" href="<?php echo $lightbox;?>" rel="prettyPhoto[gallery]" title="<?php the_title();?>"><?php the_post_thumbnail( 'portfolio-post-thumbnail-large' ); ?><span class="zoom-icon"></span><span class="opacity"></span></a>
<?php }else{ ?>
<a class="image-wrap" href="<?php the_permalink() ?>" title="<?php _e('Permanent Link to', 'theme1519');?> <?php the_title_attribute(); ?>" ><?php the_post_thumbnail( 'portfolio-post-thumbnail-large' ); ?></a>
<?php } ?>
<div class="folio-desc maxheight">
<h4><a href="<?php the_permalink(); ?>"><?php ; echo substr($title, 0, 40); ?></a></h4>
</div>
</li>
<?php $i++; $addclass = ""; endwhile; ?>
</ul>
<div class="clear"></div>
</div>
<?php if(function_exists('wp_pagenavi')) : ?>
<?php wp_pagenavi(); ?>
<?php else : ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<nav class="oldernewer">
<div class="older">
<?php next_posts_link( __('« Older Entries', 'theme1519')) ?>
</div><!--.older-->
<div class="newer">
<?php previous_posts_link(__('Newer Entries »', 'theme1519')) ?>
</div><!--.newer-->
</nav><!--.oldernewer-->
<?php endif; ?>
<?php endif; ?>
<!-- Page navigation -->
<?php $wp_query = null; $wp_query = $temp;?>
</div><!-- #content -->
<!-- end #main -->
<?php get_footer(); ?>
Alles anzeigen
Ich hoffe, ihr könnt mir da weiterhelfen.
Vielen Dank und beste Grüße