WordPress.org

Ready to get started?Download WordPress

Forums

Affiliate Hoover
Displaying related post images (4 posts)

  1. chris_hotshotcreative
    Member
    Posted 1 year ago #

    Hi

    I have a page which lists all of the posts generated by the plugin
    Is there a way I can get the related product images to display too - small thumbnails?

    Many thanks for your help,
    Chris

    http://wordpress.org/extend/plugins/affiliate-hoover/

  2. AndyWalpole
    Member
    Plugin Author

    Posted 1 year ago #

    Chris,

    At the moment in order to display images it is possible to do so by writing HTML code like so <img src="[#7#]" alt="[#3#]" /> with the contents of the CSV file being used.

    So this links to the remote file like so: <img src="http://images.productserve.com/preview/1296/126345898.jpg" alt="Multi Mission Pack System Rucksack Liner - 70 Litres">

    It's been quiet at work this week so I've been working on a way of uploading the remote image to the media gallery and then including the link.

    It's a step better than it currently is but I'll doubt though whether it will let you specify thumbnails or other image dimensions. It will just be the original image dimension sizes. I'll have to think about that.

    Regards,

    Andy

  3. chris_hotshotcreative
    Member
    Posted 1 year ago #

    I think maybe you thought I meant display an image in a page / post by inserting code in to the editor.

    What I really meant is, I have a post template which I wanted to display the images on alongside the product titles and descriptions.

    eg.

    <?php
    /**
     * The default template for displaying content for outdoor gear
     *
     * @package WordPress
     */
    ?>
    
    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    			<?php if ( is_sticky() ) : ?>
    				<hgroup>
    					<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    					<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
    				</hgroup>
    			<?php else : ?>
    			<h1 class="post-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    			<?php endif; ?>
    
    			<?php if ( 'post' == get_post_type() ) : ?>
    			<div class="entry-meta">
    				<?php twentyeleven_posted_on(); ?>
    			</div><!-- .entry-meta -->
    			<?php endif; ?>
    
    		<?php if ( is_search() ) : // Only display Excerpts for Search ?>
    			<?php wpe_excerpt('wpe_excerptlength_index', 'wpe_excerptmore'); ?>
    		<?php else : ?>
    			<div class="content-left"><?php wpe_excerpt('wpe_excerptlength_index', 'wpe_excerptmore'); ?></div>
    			<div class="content-thumb"><img src="[#7#]" alt="[#3#]" /></div>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    		<?php endif; ?>
    		<footer class="entry-meta">
    			<?php $show_sep = false; ?>
    			<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
    			<?php
    				/* translators: used between list items, there is a space after the comma */
    				$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
    				if ( $categories_list ):
    			?>
    			<span class="cat-links">
    				<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
    				$show_sep = true; ?>
    			</span>
    			<?php endif; // End if categories ?>
    			<?php
    				/* translators: used between list items, there is a space after the comma */
    				$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
    				if ( $tags_list ):
    				if ( $show_sep ) : ?>
    			<span class="sep"> | </span>
    				<?php endif; // End if $show_sep ?>
    			<span class="tag-links">
    				<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
    				$show_sep = true; ?>
    			</span>
    			<?php endif; // End if $tags_list ?>
    			<?php endif; // End if 'post' == get_post_type() ?>
    
    			<?php if ( comments_open() ) : ?>
    			<?php if ( $show_sep ) : ?>
    			<span class="sep"> | </span>
    			<?php endif; // End if $show_sep ?>
    						<?php endif; // End if comments_open() ?>
    
    		</footer><!-- #entry-meta -->
    	</article><!-- #post-<?php the_ID(); ?> -->
  4. AndyWalpole
    Member
    Plugin Author

    Posted 1 year ago #

    oh no if you place this in your template it definitely won't work:

    <div class="content-thumb"><img src="[#7#]" alt="[#3#]" /></div>

    Those tags are specific to Affiliate Hoover form only

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic