Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Thumbnails in wordpress

Featured Replies

Hey guys,

Not sure if this the correct place to place this topic. My wordpress theme is meant to have image thumbnails in the homepage. But they do not show when I add an image to my post. Any ideas on how I can fix this problem? They do show up in my categories, so how can I make a category page my home page?

How are you implementing the thumbnails? Are you using a script to get the first image of the article, or using a custom field?

  • Author

Well the theme's little instructions say just add an image in the post and the thumbnails populate automatically, custom field not required.

 

 

But I did fill in the custom field with the image url just to test, but still no luck. I wouldn't know what script to add to populate it.

 

Here is my site

Open up rewire/index.php and make sure you have:

 

<?php dp_attachment_image(0, 'thumbnail', 'alt="'.$post->post_title.'"'); ?>

 

It should be on line 12.

  • Author

Nope, don't have it. This is what mine looks like.

 

<div class="post">
<div class="l">
	<p><strong><a href="<?php if(function_exists('echo get_day_link')) echo get_day_link("$arc_year", "$arc_month", "$arc_day"); ?>">
	<?php if(function_exists('the_time')) the_time('F j, Y') ?></a></strong></p>
	<p><strong>Posted by:</strong> <?php if(function_exists('the_author_posts_link')) 

 

That's from line 10 - 14.

 

Should I add that code in? And where? Cheers

Replace the 4 lines you've pasted with this:

 

<div class="post">
       <div class="l">
               <?php dp_attachment_image(0, 'thumbnail', 'alt="'.$post->post_title.'"'); ?>
               <p><strong><a href="<?php if(function_exists('echo get_day_link')) echo get_day_link("$arc_year", "$arc_month", "$arc_day"); ?>">
               <?php if(function_exists('the_time')) the_time('F j, Y') ?></a></strong></p>
               <p><strong>Posted by:</strong> <?php if(function_exists('the_author_posts_link')) 

 

That should fix it. +1 me if I've helped :)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.