How to upload your own default product image

As you might already know - MarketPress will automatically use a default image for product if you don't assign any featured image to it. But, to be honest, the default image used by MarketPress is just pure ugly!

In this tutorial, I'll show you how to upload your own default product image and use it in all the products that doesn't have a featured image.

In short, turn this:

Into this:

Let's Get Started!

Step #1: Upload a custom default image

Just like how you upload any images into WordPress, simply go to Media > Add New and upload your custom image into the server.

Step #2: Retrieve the image url

Once you've uploaded your default image, just to Media > library, look for the image you've uploaded, and click edit

Select and copy the file url.

Step #3: Insert custom code into functions.php

Next, insert the following custom code into functions.php of your theme.

add_filter( 'mp_default_product_img' , 'mp_custom_default_image' );
function mp_custom_default_image() {
	return '--default image url--';	

Do remember to replace --default image url-- with the image url you've uploaded.

Using "Code Snippets" plugin

However, if you don't want to mess with your theme file, you can also use the Code Snippets plugin to add the custom code into your site.

Once you've installed and activated the Code Snippets plugin, simply go to Snippets > Add New.

Then, enter the title and insert the custom code into the Code section.

Next, click Save Changes & Activate and you're done!

If You're using PRO / FullWidth...

If you're using the latest version of PRO / FullWidth theme, then you don't have to go through all the steps above. All you need to do is upload / assign your custom default image via Theme Options (under MarketPress Settings), and the theme will handle the rest.

Any Questions?

As usual, if you have any questions please comment below or send me an email via the contact form.

No Comments

Leave a Reply

Head up! You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>