Skip to main content
Corrected spelling and grammar
Source Link
fuxia
  • 107.1k
  • 38
  • 255
  • 459

First, I'm a real newbie so excuse me if I suck!

I got a wp theme that can display a category page with thumbs (of posts)

What am I missing?

Thanks in advance

First, I'm a real newbie so excuse me if I suck!

I got a wp theme that can display a category page with thumbs (of posts)

What am I missing?

Thanks in advance

I got a wp theme that can display a category page with thumbs (of posts)

What am I missing?

Category page with thumb is ok but can't dido the same with tags

firstFirst, i'mI'm a real newbie so excuse me if iI suck!

iI got a wp theme that can display a category page with thumbs (of posts)

but when iI try to change it to get the same witwith "tag" every thing workworks fine but the thumb is not showing. canCan someone help me?

What am iI missing?

ThanxsThanks in advance

Category page with thumb is ok but can't di the same with tags

first, i'm a real newbie so excuse me if i suck!

i got a wp theme that can display a category page with thumbs (of posts

but when i try to change to get the same wit "tag" every thing work fine but the thumb is not showing. can someone help me?

What am i missing?

Thanxs in advance

Category page with thumb is ok but can't do the same with tags

First, I'm a real newbie so excuse me if I suck!

I got a wp theme that can display a category page with thumbs (of posts)

but when I try to change it to get the same with "tag" every thing works fine but the thumb is not showing. Can someone help me?

What am I missing?

Thanks in advance

Source Link

Category page with thumb is ok but can't di the same with tags

first, i'm a real newbie so excuse me if i suck!

i got a wp theme that can display a category page with thumbs (of posts

    $cat_args = array(
      'orderby' => 'name',
      'order' => 'ASC',
   // 'number' => $num,
      'child_of' => 0,
      'show_count' => 1
      );
 $categories =   get_categories($cat_args); 
 foreach($categories as $category) {
echo '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "Toutes les vidéos de %s" ), $category->name ) . '" ' . '><div class="video video_">';
echo '<h3>' . $category->name.'</h3>';


 $post_args = array(
  'numberposts' => 1,
  'category' => $category->term_id 
);
$posts = get_posts($post_args);
foreach($posts as $post) {
?>
    <div class="thumbnail">
        <?php if ( has_post_thumbnail() ) { echo the_post_thumbnail();}else{ ?>
            <img src="<?php echo get_post_meta($post->ID,   get_option('wptuber_thumbs'), true); ?>" alt="<?php the_title(); ?>" />
        <?php } ?>
        </div>
    <?php 
    } 
echo '<em>Toutes les videos ('.$category->count.')</em>';
echo '</div></a>';
} 
?>

but when i try to change to get the same wit "tag" every thing work fine but the thumb is not showing. can someone help me?

    $tag_args = array(
    'orderby' => 'name',
    'order' => 'ASC',
 // 'number' => $num,
    'child_of' => 0,
    'show_count' => 1
     );
$tags =   get_tags($tag_args); 
foreach($tags as $tag) {
   echo '<a href="' . get_tag_link( $tag->term_id ) . '" title="' . sprintf( __( "Toutes les videos de %s" ), $tag->name ) . '" ' . '><div class="video video_">';
echo '<h3>' . $tag->name.'</h3>';


$post_args = array(
  'numberposts' => 1,
  'tag' => $tag->term_id 
);
$posts = get_posts($post_args);
foreach($posts as $post) {
?>
    <div class="thumbnail">
        <?php if ( has_post_thumbnail() ) { echo the_post_thumbnail();}else{ ?>
            <img src="<?php echo get_post_thumbnail($post->ID, get_option('wptuber_thumbs'), true); ?>" alt="<?php the_title(); ?>" />
        <?php } ?>
        </div>
    <?php 
    }

    echo '<em>Toutes les videos de ('.$tag->count.')</em>';
echo '</div></a>';
} 

What am i missing?

Thanxs in advance