• Resolved noajou

    (@noajou)


    I want to remove this code:

    <?php if ( (function_exists(‘has_post_thumbnail’)) && (has_post_thumbnail()) ) { the_post_thumbnail(array( 200,200 ), array( ‘class’ => ‘post_thumbnail’ )); } ?>

    from the ‘single.php’ to remove the feature image from my posts. (so that the feature image is only visible on the main page)

    Does anyone know how to do this using the custom css box? (when I open the single.php in the editor I am not getting the usual code, that is why this is hopefully a more convenient way, if possible)

    All the best,
    Noah

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey there,

    CSS can’t remove PHP code, it had the display output but the code is still run.

    This theme has some in post options regarding how header of the post will display.

    https://monosnap.com/image/IHB2J9exYFjp6IYMD1sqMCOY1rx2EN

    I then took a look at the code for single.php and /templates/content-single.php but I don’t see what you posted. You are using the Virtue theme right?

    Or maybe I’m missing it?

    Take care.

    Thread Starter noajou

    (@noajou)

    Hey Timothy,

    I am just a little bit stupid, I didn’t notice that when writing a post I must’ve (accidentally) changed the ‘head content’ to ‘Image’. Which was the reason for the feature image showing in the post. My problem is solved now.

    Thank you very much for the effort!

    All the best,
    Noah

    Excellent, glad I could help ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove code’ is closed to new replies.