• Resolved manlyflower

    (@manlyflower)


    Hi, sorry about another question. I have managed so solve most of my issues, but I can’t seem to solve the one behind my site not properly retrieving featured image thumbnails for the single-post pages and recent post page. It shows the entire image, even if I specifically go into the image and edit the thumbnail manually using the wordpress admin tools.

    I am using the_post_thumbnail(); to try and retrieve it, so am I doing something incorrectly?

    I was also wondering if there was a way to only show excerpts for pages as well as posts when using the search function. I saw it in the customization tools for the recent posts page type, but those settings don’t carry over to the search or tag/category select functions. How would I change these settings manually so that it would show excerpts (or even just the title if that would be much easier) and not the full, raw page/post.

    Thanks, and sorry for all the questions.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Theme Author ThemeAWESOME

    (@tsquez)

    Hi there,

    In order to show post thumbnails you have to turn that option on in the customizer under the content section

    Post thumbnails are not displayed at something like 150×150. You can see how they are displayed on the demo site.

    When you upload the feature image it will display the featured image even if you crop it. You have to crop it, then choose the cropped image.

    And at the moment, excerpts are not supported in archive or tag pages. I can show you what to do when I get home.

    I’m not at home right now so I don’t have access to the theme files.

    Hope this helps.

    Thread Starter manlyflower

    (@manlyflower)

    Okay, thanks for the help. I should’ve just checked the thumbnail code in the functions and found the size parameters, my bad. xD It really is magical for a beginner like me to realize how much sense this stuff actually makes. I ended up changing the size and having it auto crop it because I use a lot of large pictures. Thanks for pointing that out to me.

    And also thanks in advance for the excerpt help.

    Theme Author ThemeAWESOME

    (@tsquez)

    Sorry for the delay in responding back to you, got busy with a few other things and got side tracked.

    I will show you the changes that you need to make regarding showing post excerpts on archive, search and tag pages (I am adding this as well to the next version of WP-Forge 5.5.2.6). You need to open up content.php

    the first line you need to look for is 37. It looks like this:

    <?php if ( get_theme_mod( 'wpforge_single_thumb_display' ) == 'yes' ) : // Show thumbnail in single post view if theme customizer option is set to yes ?>

    change it to this:

    <?php if ( get_theme_mod( 'wpforge_single_thumb_display','yes' ) == 'yes' ) : // Show thumbnail in single post view if theme customizer option is set to yes ?>

    next look for 41. it looks like this:

    <?php if ( is_home() && get_theme_mod( 'wpforge_thumb_display' ) == 'yes' ) : // Display thumbnail on home page if theme customizer option is set to yes ?>

    change it to this:

    <?php if ( is_home() && get_theme_mod( 'wpforge_thumb_display','yes' ) == 'yes' ) : // Display thumbnail on home page if theme customizer option is set to yes ?>

    now for the excerpt on archive, tag and search pages look for line 45. it looks like this:

    <?php if ( is_home() && get_theme_mod( 'wpforge_post_display' ) == 'excerpt' ) : // Display Excerpts if theme customizer option is set to excerpt ?>

    change it to this:

    <?php if (get_theme_mod( 'wpforge_post_display' ) == 'excerpt' ) : // Display Excerpts if theme customizer option is set to excerpt ?>

    now you should have excerpts on the archive, tag ans search pages if you have it set to excerpts in the customizer.

    Hope this helps and if still causes issue, please let me know.

    As always, enjoy!

    Thread Starter manlyflower

    (@manlyflower)

    Works perfectly, thanks for all the help even though you must be busy!

    Theme Author ThemeAWESOME

    (@tsquez)

    Oh no worries, glad to help. I got busy with stuff around the house, you know how that goes…Lol

    Thread Starter manlyflower

    (@manlyflower)

    Sorry to bring this alive once again, but I noticed that when I have the excerpts enabled, it seems to also truncate the single post page as well, with the “continue reading” just leading to the same excerpt, making it impossible to see the entire thing.

    Theme Author ThemeAWESOME

    (@tsquez)

    Hi there again,

    I think I made an error. The following:

    <?php if (get_theme_mod( 'wpforge_post_display' ) == 'excerpt' ) : // Display Excerpts if theme customizer option is set to excerpt ?>

    should actually be this:

    <?php if (is_front_page() || is_archive() || is_search() || is_tag() && get_theme_mod( 'wpforge_post_display' ) == 'excerpt' ) : // Display Excerpts if theme customizer option is set to excerpt ?>

    I believe this will do as it is expected. Sorry for the mistake.

    Theme Author ThemeAWESOME

    (@tsquez)

    uh oh that wont work at all…lol my apologies. I just got home a few minutes ago and its been a long day. I will have to look at this in the morning. Sorry for the delay.

    Thread Starter manlyflower

    (@manlyflower)

    No yeah, don’t worry about the time. I appreciate your efforts regardless.

    Theme Author ThemeAWESOME

    (@tsquez)

    Hey amigo, sorry for the delay, this apparently is trickier than I thought.

    This is needs to be dealt with using conditional statements. So for every single one I have tried works to a certain degree, but then a problem happens.

    I tried working on it this morning before work but hit another wall. I did think of a solution while I was driving so I am going to try it when I get home later.

    Again, sorry for the delay. I’ll get it, don’t worry…Lol

    Theme Author ThemeAWESOME

    (@tsquez)

    OK i think I got it. Just copy and paste this into content.php:

    <?php
    /**
     * The default template for displaying content. Used for both single and index/archive/search.
     *
     * @package WordPress
     * @subpackage WP_Forge
     * @since WP-Forge 5.5.1.7
     */
    ?>
    
    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<header class="entry-header">
    			<?php  if( get_theme_mod( 'wpforge_cat_display','yes' ) == 'yes') { ?>
    				<?php  if( get_theme_mod( 'wpforge_cat_position','top' ) == 'top') { ?>
    					<?php wpforge_entry_meta_categories(); ?>
    				<?php } // end if ?>
    			<?php } // end if ?>
    			<?php if ( is_single() ) : ?>
    				<h1 class="entry-title"><?php the_title(); ?></h1>
    			<?php else : ?>
    				<h1 class="entry-title">
    					<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'wp-forge' ), the_title_attribute( 'echo=0' ))); ?>" rel="bookmark"><?php the_title(); ?></a>
    				</h1>
    			<?php endif; // is_single() ?>
    			<div class="entry-meta-header">
    				<?php  if( get_theme_mod( 'wpforge_meta_display','yes' ) == 'yes') { ?>
    					<?php wpforge_entry_meta_header(); ?>
    				<?php } // end if ?>
    				<?php if ( comments_open() ) : ?>
    					<span class="genericon genericon-comment"></span> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Comment', 'wp-forge' ) . '</span>', __( '1 Comment', 'wp-forge' ), __( '% Comments', 'wp-forge' ) ); ?>
    				<?php edit_post_link( __( 'Edit', 'wp-forge' ), '<span class="edit-link"><span class="genericon genericon-edit"></span>','</span>' ); ?>
    				<?php else : ?>
    				<?php edit_post_link( __( 'Edit', 'wp-forge' ), '<span class="edit-link-none"><span class="genericon genericon-edit"></span>','</span>' ); ?>
    				<?php endif; // comments_open() ?>
    			</div><!-- end .entry-meta-header -->
    			<?php if ( is_home() || is_archive() || is_tag() || is_search() && get_theme_mod( 'wpforge_thumb_display','yes' ) == 'yes' ) : // Display thumbnail on home page if theme customizer option is set to yes ?>
                	<?php the_post_thumbnail(); ?>
                <?php endif; // end if ?>
    			<?php if ( is_single() ) : ?>
    	            <?php if ( get_theme_mod( 'wpforge_single_thumb_display','yes' ) == 'yes' ) : // Show thumbnail in single post view if theme customizer option is set to yes ?>
    	            	<?php the_post_thumbnail(); ?>
    	            <?php endif; // end if ?>
                <?php endif; // end if ?>
    		</header><!-- .entry-header -->
    		<?php if ( get_theme_mod( 'wpforge_post_display','full' ) == 'full' ) : ?>
    			<?php if ( is_front_page() || is_home() || is_archive() || is_search() || is_tag() ) : ?>
    				<div class="entry-content">
    					<?php the_content( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'wp-forge' ) ); ?>
    					<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __('Pages:','wp-forge'), 'after' => '</div>' )); ?>
    				</div><!-- .entry-content -->
    			<?php endif; // end if ?>
    		<?php endif; // end if ?>
    		<?php if ( get_theme_mod( 'wpforge_post_display' ) == 'excerpt' ) : ?>
    			<?php if ( is_front_page() || is_home() || is_archive() || is_search() || is_tag() ) : ?>
    				<div class="entry-summary">
    				    <?php the_excerpt(); ?>
    				</div><!-- .entry-summary -->
    			<?php endif; // end if ?>
    		<?php endif; // end if ?>
    		<?php if ( is_single() ) : ?>
    		<div class="entry-content">
    			<?php the_content( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'wp-forge')); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __('Pages:','wp-forge'), 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->
    		<?php endif; ?>
    		<footer class="entry-meta">
    			<div class="entry-meta-footer">
    				<?php  if( get_theme_mod( 'wpforge_cat_display' ) == 'yes') { ?>
    					<?php  if( get_theme_mod( 'wpforge_cat_position' ) == 'bottom') { ?>
    						<?php wpforge_bottom_meta_categories(); ?>
    					<?php } // end if ?>
    				<?php } // end if ?>
    				<?php  if( get_theme_mod( 'wpforge_tag_display','yes' ) == 'yes') { ?>
    					<?php wpforge_entry_meta_footer(); ?>
    				<?php } // end if ?>
    			</div><!-- end .entry-meta-footer -->
    				<?php get_template_part( 'content', 'author' ); ?>
    		</footer><!-- .entry-meta -->
    	</article><!-- #post -->

    I think this is it…I didn’t see anything wrong happening after I put this together.

    Let me know how it goes.

    Thread Starter manlyflower

    (@manlyflower)

    Yes, it looks like it works great! Thanks for the continual help!

    Theme Author ThemeAWESOME

    (@tsquez)

    Awesome, glad it’s working and its my pleasure. Only when users such as yourself bring bugs like this to my attention can they be fixed, so a big thank you to you sir!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Not retrieving thumbnails’ is closed to new replies.