How can I change the placeholder for listings with no images?

Sometimes, your listings might not have a gallery or simple image assigned to them. In this case, the cards from the archive will be empty, with nothing on them. This can be changed with a simple piece of code. Just follow these steps:

Step 1 – Add the code to your website

Just copy this code in the functions.php file (you can find it by going to Appearance → Theme Editor):

function replace_card_placeholder () {
	return 'image_link';
add_filter( 'listing_card_placeholer', 'replace_card_placeholder' );

Replace the image_link part with a link to the image you’d like to use as a placeholder.

If you don’t want to make changes inside the functions.php file, you can use the Code Snippets plugin instead. This will do exactly the same thing for you.

Updated on May 11, 2021

Can't find what you’re looking for? Ask a human.

We're a small team of real people providing real help. Send us an email at [email protected] and we will give you a helping hand.