Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter releone

    (@releone)

    after many test I found the issue…the tag slug and tag name was not the same!!

    Btw thanks for your help, this thread could be closed, thx!

    Thread Starter releone

    (@releone)

    I teste also this code:

    $args = array(
                                    'post_type' => 'casino',
                                    'affiliate-tags' => 'featured',
                                    'orderby' => 'rand',
                                    'posts_per_page' => 6
                                );
                    $the_query = new WP_Query( $args );

    it is unbelivable that this loop works with an “affiliate_tags” => ‘featured’ but NOT with ‘affiliate_tags’ => ‘netent’ …. (empty result)

    helpppppppp

    Thread Starter releone

    (@releone)

    hi efuller, thx a lot for the tip but I still have issues with my loop.

    I did different tests and basically seems that the system doesn’t accept a specific tag.

    At this point my question is: is there chance that could be a conflict of a specific tag in the wp code?

    Basically I have 3 different post_type (2 default “post” and “page” and 1 different “casino”), both “post” and “casino” have the tag “netent” but declared in different way:

    post_type = post
    tag = netent

    post_type = casino
    affiliate-tags = netent

    when I create the loop I use:

    <?php
    $args = array(
    'post_type' => 'casino',				'affiliate-tags' => 'netent',					'orderby' => 'rand',					'posts_per_page' => 6
    );
    $the_query = new WP_Query( $args );
    ?>
    <?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

    with the tag “netent” it doesn’t work and the objects in the loop are empty.

    tried but it does not work 🙁

    <?php query_posts('cat=40'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    		<div class="widget-games">
    			<div class="title">
    				<h3><a href="<?php the_permalink(); ?>" rel="bookmark" title="More info about <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    			</div>
    
    			<div class="post-image"><?php the_post_thumbnail(); ?></div>
    			<strong><div class="post-image"><?php get_nth_featured_image( 2 ); ?></div>
    			<div class="post-image"><?php get_nth_featured_image( 3 ); ?></div></strong>
    
    			<!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. -->
    			<small><?php the_time('F jS, Y'); ?> by <?php the_author_posts_link(); ?></small>
    
    			<!-- Display the Post's content in a div box. -->
    
    			<div class="entry">
    				<?php the_content(); ?>
    				<?php the_excerpt(); ?>
    			</div>
    
    			<!-- Display a comma separated list of the Post's Categories. -->
    
    			<p class="postmetadata"><?php _e( 'Posted in' ); ?> <?php the_category( ', ' ); ?></p>
    		</div> <!-- closes the first div box -->
    
    		<!-- Stop The Loop (but note the "else:" - see next line). -->
    
    		<?php endwhile; else : ?>
    
    			<!-- The very first "if" tested to see if there were any Posts to -->
    			<!-- display.  This "else" part tells what do if there weren't any. -->
    		<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
    
    			<!-- REALLY stop The Loop. -->
    		 <?php endif; ?>

    RESULT IN PAGE:
    Fatal error: Call to undefined function get_nth_featured_image()

    I have a similar question, currently I’m doing a post loop and want to get a list of featured images for that post.
    This is my loop:

    <?php query_posts('cat=40'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    		<div class="widget-games">
    			<div class="title">
    				<h3><a href="<?php the_permalink(); ?>" rel="bookmark" title="More info about <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    			</div>
    
    			<div class="post-image"><?php the_post_thumbnail(); ?></div>
    <strong><div class="post-image"><?php the_post_thumbnail-2(); ?></div>
    <div class="post-image"><?php the_post_thumbnail-3(); ?></div></strong>
    
    			<!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. -->
    			<small><?php the_time('F jS, Y'); ?> by <?php the_author_posts_link(); ?></small>
    
    			<!-- Display the Post's content in a div box. -->
    
    			<div class="entry">
    				<?php the_content(); ?>
    				<?php the_excerpt(); ?>
    			</div>
    
    			<!-- Display a comma separated list of the Post's Categories. -->
    
    			<p class="postmetadata"><?php _e( 'Posted in' ); ?> <?php the_category( ', ' ); ?></p>
    		</div> <!-- closes the first div box -->
    
    		<!-- Stop The Loop (but note the "else:" - see next line). -->
    
    		<?php endwhile; else : ?>
    
    			<!-- The very first "if" tested to see if there were any Posts to -->
    			<!-- display.  This "else" part tells what do if there weren't any. -->
    		<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
    
    			<!-- REALLY stop The Loop. -->
    		 <?php endif; ?>

    I need a simple code to call these images (something easy like that one I use for the default featured image).

    Obviously:
    <div class=”post-image”><?php the_post_thumbnail(); ?></div> (this is the real wordpress code for the featured image)
    <div class=”post-image”><?php the_post_thumbnail-2(); ?></div> (code invented where I need your help)
    <div class=”post-image”><?php the_post_thumbnail-3(); ?></div> (code invented where I need your help)

Viewing 5 replies - 1 through 5 (of 5 total)