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:

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 17, 2017

Was this article helpful?

Related Articles