Site logo

Archived topic

Removing Bottom Site Image on WooCommerce product pages.

11 replies · Started by Joseph on May 24, 2018

Viewing posts 1–12 of 12

I'm using GPHooks for social media icons and a "Cowboy image" When on WooCommerce I used the PHP for "is_single" "is_product_category" to add the header info and footer info for WooCommerce. I left out the "Cowboy Image" but it is still overwritten by the page hook used throughout the website.

Not to complicate things, can you point me in the direct to remove the "Cowboy Image" at the bottom of the page for the WooCommerce completely or full width like the rest of the website pages.

You can view the pesky image at the bottom of this product page

Thanking you in advance

Hi there,

So they should only show up on WooCommerce pages?

If so try the is_woocommerce() condition.

Not quite sure what you mean by "to remove the “Cowboy Image” at the bottom of the page"?

Let me know :)

Thanks for your Response Leo. I want to remove the image from WooCommerce only. It's okay for the other WP pages. I tried the is_woocommerce condition and the image still shows up on WooCommerce?

Any chance you can share your current code?

Let me know :)

Hey Tom, The image that continues to show in WooCommerce is in the is_page condition between the

This is for the site pages: After Footer Widgets

<?php if ( is_page ('') ) : ?>

<p style="text-align:center;background:#1c2533;"><i style="color:#ffffff;font-size:1.5em;" class="fab fa-twitter"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-facebook-f"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-google-plus-g"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-youtube"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-blogger-b"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-goodreads-g"></i></p>
<?php endif; ?>

This is for the WppCommerce Catalog and Single Product Pages: After Footer Widgets

<?php if (is_product_category('') ) : ?>
<p style="text-align:center;background:#1c2533;margin-top:4%;"><i style="color:#ffffff;font-size:1.5em;" class="fab fa-twitter"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-facebook-f"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-google-plus-g"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-youtube"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-blogger-b"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-goodreads-g"></i></p>
<?php endif; ?>
----------------------------
<?php if (is_single('') ) : ?>
<p style="text-align:center;background:#1c2533;margin-top:4%;"><i style="color:#ffffff;font-size:1.5em;" class="fab fa-twitter"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-facebook-f"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-google-plus-g"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-youtube"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-blogger-b"></i><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-goodreads-g"></i></p>
<?php endif; ?>

Here is the URL for one of the single pages in WooCommerce and you'll see the Cowboy image at the bottom that I want to remove?
http://provinciawebdesign.com/client/onecowboy/product/lv-flag/

Thanks

Hi Joseph, may i suggest you hook the image separately like so - this will display it on all pages apart from product category and singles:

<?php if ( ! is_product_category() && ! is_single() ) : ?>
    Image here  
<?php endif; ?>

And then hook the comment content separately, assuming it is the same on all pages

Hi David, thank you for your reply. What the code you provided did was remove the image from all of the website pages instead of just the catalog and single product pages. Basically it did the opposite of what I am trying to achieve?

Hi Joseph, is there any other code in there with that? I just tried it on a Woo shop, and the content appears on all pages including the home (shop) but not the product, product category or single post pages.

Dave here is the what I have. Which is the image (footer.png) and the social media. I left out the image in the is_product_catagory condition.

You can see why I want to remove it from the catalog and single product pages here:
http://www.lavoyfinicum.org/shop/

<?php if ( is_page ('') ) : ?> 
<div>
<img src="http://www.lavoyfinicum.org/wp-content/uploads/2018/05/footer.png" />
</div>

<p style="text-align:center;background:#1c2533;margin-top:3%;"><a href="https://twitter.com/OneCowboysStand" target="_blank"><i style="color:#ffffff;font-size:1.5em;" class="fab fa-twitter"></i></a><a href="https://www.facebook.com/lavoy.finicum" target="_blank"><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-facebook-f"></i></a><a href="https://plus.google.com/u/0/106063155814244126923" target="_blank"><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-google-plus-g"></i></a><a href="https://www.youtube.com/channel/UCIVPq7ybILJnY0B2aqpaXNA" target="_blank"><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-youtube"></i></a><a href="http://lavoyfinicumsfamilystandforfreedom.blogspot.com/" target="_blank"><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-blogger-b"></i></a><a href="https://www.goodreads.com/author/show/14132471.LaVoy_Finicum" target="_blank"><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-goodreads-g"></i></a></p>
<?php endif; ?>

<?php if (is_product_category('') ) : ?>
<p style="text-align:center;background:#1c2533;margin-top:4%;"><a href="https://twitter.com/OneCowboysStand" target="_blank"><i style="color:#ffffff;font-size:1.5em;" class="fab fa-twitter"></i></a><a href="https://www.facebook.com/lavoy.finicum" target="_blank"><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-facebook-f"></i></a><a href="https://plus.google.com/u/0/106063155814244126923" target="_blank"><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-google-plus-g"></i></a><a href="https://www.youtube.com/channel/UCIVPq7ybILJnY0B2aqpaXNA" target="_blank"><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-youtube"></i></a><a href="http://lavoyfinicumsfamilystandforfreedom.blogspot.com/" target="_blank"><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-blogger-b"></i></a><a href="https://www.goodreads.com/author/show/14132471.LaVoy_Finicum" target="_blank"><i style="color:#ffffff;font-size:1.5em;padding-left:1em" class="fab fa-goodreads-g"></i></a></p>
<?php endif; ?>

Hi Joseph, can you check the other hooks?
On the woo page i can see the image in a content hook as well as a footer hook.

That was it David, thank you for your assistance.

Glad to hear you got it resolved.

This archived topic is closed to new replies.