Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 4th, 2013, 11:08 PM
1800HART 1800HART is offline
 
Join Date: Apr 2008
Posts: 487
Default Can you help with Theme Thumbnails?

I'm trying to work in a new theme on http://PetLvr.com ... but somehow can't figure out how to get the DFR images shown on the front page. The theme is supposed to pick up the first image of the post, but because it's a shortcode it doesn't.

I see in the custom field section either "store_image" or "store_thumbnail" that is available ... is there a tutorial or forum post already that can help me figure out how to display the drip feed images on my front page?

In the hopes of an easier solution - this is my index.php file for the theme....

Thanks Eric
HART

Code:
<?php get_header(); ?>

<div id="<?php if (is_home()) echo('wrapper-home'); else echo('container'); ?>">
	<?php if (get_option('wooden_featured') <> 'false' && is_home()) get_template_part( 'includes/featured'); ?>

	<div id="left-div">
		<div id="left-inside">

			<div class="home-post-wrap">
				<div class="heading">
					<span style="font-size: 14px; font-weight: bold;"><?php esc_html_e('Recent Articles','Wooden'); ?></span>
				</div>

			   <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

					<?php $thumb = '';

					$width = 111;
					$height = 111;
					$classtext = '';
					$titletext = get_the_title();

					$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
					$thumb = $thumbnail["thumb"]; ?>

					<!--Begin Post Single-->
					<div class="post clearfix">
						<?php if($thumb != '' && get_option('wooden_thumbnails_index') <> 'false') { ?>
							<div class="thumbnail-div">
								<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
							</div>
						<?php }; ?>

						<div class="home-post-content">
							<h2 class="titles">
								<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(esc_attr__ ('Permanent Link to %s', 'Wooden'), $titletext) ?>">
									<?php truncate_title(35); ?>
								</a>
							</h2>

							<?php get_template_part('includes/postinfo'); ?>

							<div>
								<?php truncate_post(240); ?>
							</div>

							<div class="readmore">
								<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(esc_attr__ ('Permanent Link to %s', 'Wooden'), $titletext) ?>"><?php esc_html_e('Read More','Wooden'); ?></a>
							</div>
						</div> <!-- end .home-post-content -->
					</div> <!-- end .post -->
			    <?php endwhile; ?>
					<div style="clear: both;"></div>
					<?php get_template_part('includes/navigation'); ?>
				<?php else : ?>
					<?php get_template_part('includes/no-results'); ?>
				<?php endif; ?>

			</div> <!-- end .home-post-wrap -->
			<div style="clear: both;"></div>

			<?php if (is_home()) { ?>

				<?php if (get_option('wooden_show_recent_comments') == 'on') { ?>
					<!--Begin Recent Comments-->
					<div class="home-squares">
						<div class="heading">
							<span style="font-size: 14px; font-weight: bold;"><?php esc_html_e('Recent Comments','Wooden'); ?></span>
						</div>
						<div class="recent-comments">
							<?php get_template_part('simple_recent_comments'); /* recent comments plugin by: www.g-loaded.eu */?>
							<?php if (function_exists('src_simple_recent_comments')) { src_simple_recent_comments(6, 60, '', ''); } ?>
						</div>
					</div>
					<!--End Recent Comments-->
				<?php }; ?>

				<?php if (get_option('wooden_show_random_posts') == 'on') { ?>
					<!--Begin Random Posts-->
					<div class="home-squares">
						<div class="heading">
							<span style="font-size: 14px; font-weight: bold;"><?php esc_html_e('Random Articles','Wooden'); ?></span>
						</div>

						<?php query_posts("orderby=rand&posts_per_page=3");
						while (have_posts()) : the_post(); ?>
							<?php $thumb = '';

							$width = 70;
							$height = 80;
							$classtext = 'no-border';
							$titletext = get_the_title();

							$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
							$thumb = $thumbnail["thumb"]; ?>

							<div class="random">
								<?php if($thumb != '') { ?>
									<div class="random-image">
										<a href="<?php the_permalink() ?>">
											<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
										</a>
									</div>
								<?php }; ?>
								<div class="random-content">
									<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(esc_attr__ ('Permanent Link to %s', 'Wooden'), $titletext) ?>">
										<?php truncate_title(35); ?>
									</a>
									<?php truncate_post(90); ?>
								</div>
							</div> <!-- end. random-->
						<?php endwhile; ?>
					</div>
					<!--End Random Posts-->
				<?php }; ?>

				<?php if (get_option('wooden_show_aboutus') == 'on') { ?>
					<!--Begin About Us-->
					<div class="home-post-wrap">
						<div class="heading">
							<span style="font-size: 14px; font-weight: bold;"><?php esc_html_e('About Us','Wooden'); ?></span>
						</div>
						<?php echo(get_option('wooden_about_us')); ?>
					</div>
					<!--End About Us-->
				<?php }; ?>

			<?php }; ?>

		</div> <!-- end #left-inside -->
	</div> <!-- end #left-div -->

	<!--Begin Sidebar-->
	<?php get_sidebar(); ?>
	<!--End Sidebar-->

</div> <!-- end #wrapper-home -->

<!--Begin Footer-->
<?php get_footer(); ?>
<!--End Footer-->
</body>
</html>
__________________
| Shop @ HART Markets | Twitter |
  #2  
Old May 5th, 2013, 08:54 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

It might be easier just to set a dripped post's image as the feature image. Then your theme should pick that up.

Here's how: http://www.datafeedr.com/forums/show...8265#post38265

Eric
  #3  
Old May 5th, 2013, 10:13 AM
1800HART 1800HART is offline
 
Join Date: Apr 2008
Posts: 487
Default

That didn't seem to work for me ...

I added the code to my functions.php file, but it didn't work. Just in case it was to work only on new dripped posts, I tried a few and it still didn't work. I did notice something odd however (but not sure if it is because I added the code or prior to that) .. all my drip posts are "published" 5 hours earlier which, in CST time is -5 UTC timezone ??

I will double check with my host if "file_get_content/fopen/fputs" is allowed, although I'm quite sure if that means "allow_url_fopen On" then it probably is.

HART

Quote:
Originally Posted by Eric View Post
Hi,

It might be easier just to set a dripped post's image as the feature image. Then your theme should pick that up.

Here's how: http://www.datafeedr.com/forums/show...8265#post38265

Eric
__________________
| Shop @ HART Markets | Twitter |
  #4  
Old May 5th, 2013, 12:09 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

You could try replacing this:
PHP Code:
                        <?php if($thumb != '' && get_option('wooden_thumbnails_index') <> 'false') { ?>
                            <div class="thumbnail-div">
                                <?php print_thumbnail($thumb$thumbnail["use_timthumb"], $titletext $width$height$classtext); ?>
                            </div>
                        <?php }; ?>
With this:
PHP Code:
                        <?php if($thumb != '' && get_option('wooden_thumbnails_index') <> 'false') { ?>
                            <div class="thumbnail-div">
                                <?php print_thumbnail($thumb$thumbnail["use_timthumb"], $titletext $width$height$classtext); ?>
                            </div>
                        <?php } elseif ($image_url get_post_meta(get_the_ID(), 'store_image'true)) { ?>
                            <div class="thumbnail-div">
                                <?php echo '<img src="'.$image_url.'" width="111" title="#post_'.get_the_ID().'">'?>
                            </div>                        
                        <?php ?>
Eric
  #5  
Old May 5th, 2013, 02:39 PM
1800HART 1800HART is offline
 
Join Date: Apr 2008
Posts: 487
Default

That worked!! http://petlvr.com/ it looks great!

Thanks Eric
HART


Quote:
Originally Posted by Eric View Post
Hi,

You could try replacing this:
PHP Code:
                        <?php if($thumb != '' && get_option('wooden_thumbnails_index') <> 'false') { ?>
                            <div class="thumbnail-div">
                                <?php print_thumbnail($thumb$thumbnail["use_timthumb"], $titletext $width$height$classtext); ?>
                            </div>
                        <?php }; ?>
With this:
PHP Code:
                        <?php if($thumb != '' && get_option('wooden_thumbnails_index') <> 'false') { ?>
                            <div class="thumbnail-div">
                                <?php print_thumbnail($thumb$thumbnail["use_timthumb"], $titletext $width$height$classtext); ?>
                            </div>
                        <?php } elseif ($image_url get_post_meta(get_the_ID(), 'store_image'true)) { ?>
                            <div class="thumbnail-div">
                                <?php echo '<img src="'.$image_url.'" width="111" title="#post_'.get_the_ID().'">'?>
                            </div>                        
                        <?php ?>
Eric
__________________
| Shop @ HART Markets | Twitter |
  #6  
Old May 5th, 2013, 02:50 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by 1800HART View Post
That worked!! http://petlvr.com/ it looks great!

Thanks Eric
HART
Excellent!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Category Thumbnails sian75 Questions 7 March 18th, 2013 01:09 PM
How To Get Thumbnails To Show? kowboy Questions 12 May 4th, 2012 03:01 PM
No Thumbnails/Images bmcoffee Problems 1 January 12th, 2012 12:42 AM


All times are GMT -5. The time now is 03:21 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.