• Resolved byoung85

    (@byoung85)


    Hi Robin,

    This is a wonderful plugin that fits my need! Thanks for creating such an awesome plugin ??

    While integrating the plugin to use on my company site, I came across a few issues that I hope you can address:

    1) The plugin doesn’t seem to work on WooCommerce ‘Shop’ page that I designated from WooCommerce settings. Any idea as to why?
    2) I want to output featured images on product category pages, but not on the actual single product page.

    Any feedback would be appreciated!

    – Alex

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter byoung85

    (@byoung85)

    Somewhat figured out the second part. The page title, however, does not overlay on top of the featured images like it’s supposed to.

    Here’s a screenshot fyr:

    Issue

    Any suggestions?

    • This reply was modified 7 years, 11 months ago by byoung85.
    Plugin Author Robin Cornett

    (@littlerchicken)

    Hey Alex! For the shop page, even though WooCommerce uses a Page for that, WordPress considers the shop to be a post type archive, so the rules that apply to single posts/pages/products don’t apply here.

    If you go to Appearance > Display Featured Image for Genesis and then to the Content Types tab, there will be a place allowing you to set an image for Products, and that will apply to your shop page. It will also show as the banner image for products which do not have a featured image, or if their featured image is too small.

    I am unable to see your screenshot, sorry–looks like it’s behind a password. A cause of the title not overlaying the image might be CSS, or it might be the “Do Not Move Titles” setting being checked on the plugin’s main tab, or it could be that the image in question is too small to backstretch. I would check those things, but if you can move the screenshot to an accessible URL, I can try to diagnose from that, although it may be hard to tell from just a picture.

    Plugin Author Robin Cornett

    (@littlerchicken)

    For the question about skipping single products: you can navigate to Appearance > Display Featured Image for Genesis > Content Types and tell the plugin to skip products.

    As far as Woo archives go, when I look locally, I’m getting duplicate titles–one over the image and one output by WC. Looks like I can disable the WC one with this code:

    
    add_filter( 'woocommerce_show_page_title', '__return_false' );
    

    but as for why the title is not showing over the image, I cannot tell that from the screenshot. Hope this helps you get started.

    Thread Starter byoung85

    (@byoung85)

    Hi Robin!

    Thank you so much for the detailed reply!

    I’ve taken your suggestions and made some progress in setting up my site. The duplicate page title issue in Woocommerce page is solved, and the product archives are now correctly showing the archive descriptions. Yay!

    The only issue I’m having now is that the single product page (single.php) is taking the short product description and duplicating it on top of the featured image like so:

    Do you have any advice on how to go about this issue? The website is now live (beta launch), and the issue can be found here:

    https://trueledusa.com/product/e26-led-spiral-bulb/

    • This reply was modified 7 years, 10 months ago by byoung85.
    Thread Starter byoung85

    (@byoung85)

    The only workaround solution I found was using ‘Skip Content Types’ option found under ‘Content Types’ tabs in the plugin setting, which disables the plugin for single products.

    Found another issue. The designated ‘Shop’ page does not appear at all:

    https://trueledusa.com/all-products/

    Any suggestions/advice on this issue would be highly appreciated!

    Plugin Author Robin Cornett

    (@littlerchicken)

    It looks like the filter to remove the page title:

    
    add_filter( 'woocommerce_show_page_title', '__return_false' );
    

    needs to be removed for the shop title to show. That may bring back the duplicate titles on the single product pages, if you re-enable the featured image display for them.

    It looks like you’re using the setting to move the excerpts to overlay the featured image, which is why the product short description is going there. If you want to have the excerpts over the featured image everywhere except for product related pages, this filter should work:

    
    add_filter( 'display_featured_image_genesis_omit_excerpt', 'prefix_skip_product_excerpts' );
    function prefix_skip_product_excerpts( $omit ) {
    	return array_merge( $omit, array( 'product' ) );
    }
    

    (Please practice safe coding, back up your site, etc. etc.) Hope this helps–

    Thread Starter byoung85

    (@byoung85)

    Thanks Robin!

    Decided not to use the featured images for single product pages, so that solved the product short description duplicate issue.

    I removed the page title filter and the shop title is now visible, but I still can’t get it to show it over the featured image:

    shop-page

    The product category archive pages all show titles over and below the featured image:

    product-category-archive-page

    Plugin Author Robin Cornett

    (@littlerchicken)

    Ah, I think I see what’s going on–it’s kind of a combination of how Woo creates the archive page–by fudging a bit and using a Page to create the title and content, but it’s really output as a post type archive. The featured image plugin does not add a title to the featured image for post type archives if the post type doesn’t support the custom Genesis archive settings, so the way to get around that would be to add support for them to your site. Something like this code:

    add_action( 'init', 'prefix_add_genesis_cpt_support_products' );
    function prefix_add_genesis_cpt_support_products() {
    	add_post_type_support( 'product', 'genesis-cpt-archives-settings' );
    }
    

    Then in your admin, you would have a new submenu item under Products, called Archive Settings. If you enter a headline there, it will be added over the featured image on the main shop page. Then you would probably want to re-add the woo title filter that was removed.

    Thread Starter byoung85

    (@byoung85)

    Works perfectly! Thank you so much for all the help!

    I’m now using the plugin in several of my side project websites ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Conditional use with Woocommerce’ is closed to new replies.