• domain 1

    (@domain-1)


    Hi,

    I have a big issue and don’t want to sound pessimistic, but don’t think it’s curable. I’ve spent the last while reading posts on this topic with no joy.

    The main problem is that I am depending on these featured images for my homepage sliders and recent posts widget, but they are also appearing full size on the top of the actual post page where I don’t want them.

    I have copied and pasted code from my themes content.php file as I think the issue is there – but if I as much as touch/remove something from this this code I get a syntax error on my post page. Also there is code similar to the below in other php files on the site.

    Would really appreciate help, thanks.

    if ( is_singular() && is_main_query() ) {
    
    	if( of_get_option('blog_single_thumbnail', '1') == '1' && has_post_thumbnail() ) { ?>
                <div id="post-thumbnail">
                    <img src="<?php echo aq_resize( wp_get_attachment_url( get_post_thumbnail_id() ),  wpex_img( 'post_width' ), wpex_img( 'post_height' ), wpex_img( 'post_crop' ) ); ?>" alt="<?php echo the_title(); ?>" />
                </div><!-- /post-thumbnail -->
            <?php }
    
    /******************************************************
     * Entries
     * @since 1.0
    *****************************************************/
    } else { ?>
    
        <article <?php post_class('post-entry clearfix'); ?>>
     <?php if( has_post_thumbnail() ) {  ?>
                <div class="post-entry-thumbnail">
                    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
                    	<img src="<?php echo aq_resize( wp_get_attachment_url( get_post_thumbnail_id() ),  wpex_img( 'entry_width' ), wpex_img( 'entry_height' ), wpex_img( 'entry_crop' ) ); ?>" alt="<?php echo the_title(); ?>" />
                        <?php
    					// hover overlay
                        if( of_get_option('entry_overlay','1') == '1') { ?><span class="overlay <?php echo get_post_format(); ?>"></span><?php }
    					// Sticky post star graphic
                        if(is_sticky()) echo '<span class="sticky-overlay"></span>'; ?>
                    </a>
                </div><!-- /post-entry-thumbnail -->
    <?php } ?>
            <div class="post-entry-details <?php if( !has_post_thumbnail() ) echo 'full-width'; ?>">
            	<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
                <ul class="post-entry-meta clearfix">
                	<li><?php echo get_the_date(); ?> //</li>
                    <li><a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>"><?php the_author_meta('display_name'); ?></a>
Viewing 9 replies - 1 through 9 (of 9 total)
  • Mike Price

    (@castroboy)

    Hey there,

    This can definitely be solved. Its a matter of removing the “thumbnail” php code from your single.php file of your theme. What theme are you using?

    Mike

    psa234

    (@psa234)

    If you want something that’s a little less intrusive, you might be able to just “display: none;” it in CSS. It’s really easy, and it’s very hard to break something there. Can you post a link to the page?

    Thread Starter domain 1

    (@domain-1)

    Castro I actually have removed everything with “thumbnail” from single.php but no change.

    This is the only remaining code with the word image in single.php

    <?php
    		// show media (image/video/gallery) if NOT a private post
            if ( !post_password_required() && of_get_option('single_post_media','1') == '1' && $page < 2 ) {
    			get_template_part( 'content', get_post_format() );

    This is the wordpress theme I am using.

    https://themeforest.net/item/bloggit-responsive-wordpress-blogmagazinenews/full_screen_preview/3866432

    My google chrome “inspect element” shows it as <div id=”post-thumbnail”> which as you can see in my first post DOES appear in content.php but when I tamper with that I get syntax errors.

    Thread Starter domain 1

    (@domain-1)

    psa234

    Thanks, after about 10 mins adjusting my CSS file I got this to work – but it couldn’t be that easy, is there a catch with doing this?

    Thanks.

    psa234

    (@psa234)

    There are 2 things that could happen:
    1. This could slow down your site a little (because it’s loading unneeded code but not actually using that unneeded code).
    2. Depending on how you did it in CSS, it could cause something else to disappear when you don’t want it to (because CSS rules can apply to multiple different elements). What did you change?

    psa234

    (@psa234)

    BTW – That’s why I love CSS, because it is THAT EASY! ?? ?? ??

    Mike Price

    (@castroboy)

    Yay glad you got this figured out ??

    ( I am new to CSS)

    Mike

    psa234

    (@psa234)

    Can we mark this one “Resolved” then? (You need to do that, domain 1)

    Thread Starter domain 1

    (@domain-1)

    There are 2 things that could happen:
    1. This could slow down your site a little (because it’s loading unneeded code but not actually using that unneeded code).
    2. Depending on how you did it in CSS, it could cause something else to disappear when you don’t want it to (because CSS rules can apply to multiple different elements). What did you change?

    But the featured image is actually completely gone from the posts, not invisible, so doesn’t that mean the browser will not load it?

    Just before I mark this as resolved, could anyone just have a quick look at my OP post to even give me an idea on what part of that code I could safely remove without getting syntax errors or even what to “change” to stop it.

    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Removing Featured Image From WordPress Post Page?’ is closed to new replies.