• Resolved ibrahima fall

    (@ibrahima-fall)


    Hello. I’ve had this issue with marketpress lite in the Twenty Eleven theme where I have to make sure a product’s featured image has smaller dimensions than the header or else it will replace the header image with the product featured image on the product page. I am now populating a new marketpress lite store on the Matheson theme and it does the same thing, but changing the size of the product featured image does nothing to fix it.

    Here’s how things are looking

    Any ideas on how to make it not change the site header image?

    https://www.ads-software.com/plugins/wordpress-ecommerce/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @ibrahima fall,

    Greetings and thanks for posting on the forums.

    This is a default functionality of Twenty Eleven theme but if you don’t want to use it on single product page then you can just edit the following code in the header.php theme file on line number 101

    Before Editing:

    $image[1] >= $header_image_width ) :

    After Editing:

    $image[1] >= $header_image_width  && ! is_singular('product') ) :

    Kind Regards,
    WPMU DEV

    Thread Starter ibrahima fall

    (@ibrahima-fall)

    Hello, thank you for your reply.
    This is good to know for Twenty Eleven theme.
    My problem now is how to fix in the Matheson theme.
    What is best way to send you the Header.php file for Matheson theme so as not to display in the forum post?

    Thread Starter ibrahima fall

    (@ibrahima-fall)

    i posted Matheson theme Header.php to pastebin for you to view:
    https://pastebin.com/embed_js.php?i=GEiR1n83

    Hi @ibrahima fall,

    Thanks for your replies. Just to clarify, it’s not that the theme or plugin needs to be fixed, rather that’s a feature of the theme.

    It’s best to ask the theme developer for specifics on how to best achieve this but for a quick fix you should be able to change line 776 of the theme’s functions.php file like so:

    if ( is_singular() && ( ! is_singular('product') ) && ( ! empty( $custom_image ) || has_post_thumbnail() ) ) {

    Perhaps that’ll do the trick?

    Thread Starter ibrahima fall

    (@ibrahima-fall)

    excellent! it did the trick! many thanks!!

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @ibrahima fall,

    You are most welcome, if we can be of any further assistance please don’t hesitate to ask ??

    Cheers,
    WPMU DEV

    Thread Starter ibrahima fall

    (@ibrahima-fall)

    Hello. After my update to Marketpress Lite newest version & WordPress update, i notice my “featured image replacing header image” problem came back even with the custom html in the functions.php still there. My theme has not updated though. Here’s one of my category pages for you to see the problem. Help soon would be very appreciated!!

    Hi @ibrahima fall,

    Thanks for posting back here. That would have to come from your theme actually. MarketPress doesn’t display the featured image in the header on its own.

    Could I ask if you’ve tried contacting the theme developer to see if that could be implemented to avoid any further issues with this?

    Thanks,
    David

    Thread Starter ibrahima fall

    (@ibrahima-fall)

    Thank you for replying, David.

    Yes the problem is it is the free version of what is also offered as a premium theme so updates do not have much of a priority. I and other users have contacted the developer on the matter but no update yet. That is why it was great to get the code trick you provided. And I’m very unsure why in the last Marketpress update the code no longer serves its function since the theme itself is the same version. Thank you again.

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @ibrahima fall,

    Just try whether it is working fine for you or not if you use previous version of MarketPress plugin by downloading it from the following page.

    https://www.ads-software.com/plugins/wordpress-ecommerce/developers/

    Kind Regards,
    WPMU DEV

    Thread Starter ibrahima fall

    (@ibrahima-fall)

    Hi @wpmu DEV. Indeed the problem is corrected when uploading to previous version 2.1.3. I will keep it on this install for the sake of the site appearance.

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @ibrahima fall,

    For now to resolve the issue you can just use the previous version of MarketPress plugin.

    If you can just send the matheson theme on the email id contact[at]wpmudev.org so that we can troubleshoot the issue.

    – Include my name in the subject “Vinod Dalvi”
    – Include the URL of this post in your message so that I may track this issue better

    Also share the screenshot of the issue if you can.

    For screenshots, you can simply provide a link to an image through Google Drive, Dropbox, screencast.com, https://imgur.com/ or other image service. ??

    Cheers,
    WPMU DEV

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @ibrahima fall,

    To resolve the issue with the latest version of MarketPress plugin and Matheson theme try editing the following code on line number 767 in the functions.php file of Matheson theme as displayed below.

    Before Editing:

    if ( is_singular() && ( ! empty( $custom_image ) || has_post_thumbnail() ) ) {
    	if ( $custom_image )
    		echo '<img src="' . esc_url( $custom_image ) . '" alt="" class="header-img" />';
    	else
    		the_post_thumbnail( 'full', array( 'class' => 'header-img' ) );
    } else {

    After Editing:

    if ( is_singular() && ( ! is_singular('product') ) && ( ! empty( $custom_image ) || has_post_thumbnail() ) ) {
    	if ( $custom_image )
    		echo '<img src="' . esc_url( $custom_image ) . '" alt="" class="header-img" />';
    	else
    		the_post_thumbnail( 'full', array( 'class' => 'header-img' ) );
    } else {

    Note: You are making changes in the plugin file and these changes will be overwritten and lost when you update the plugin and you will have to make these changes again after plugin updation.

    Best Regards,
    Vinod Dalvi

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘product featured image replaces header image in matheson theme’ is closed to new replies.