- This topic has 11 replies, 4 voices, and was last updated 5 years, 11 months ago by David.
-
AuthorPosts
-
May 24, 2018 at 5:09 pm #584046Joseph
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
May 24, 2018 at 8:37 pm #584110LeoStaffCustomer SupportHi 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 🙂
May 24, 2018 at 9:05 pm #584117JosephThanks 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?
May 24, 2018 at 9:11 pm #584123TomLead DeveloperLead DeveloperAny chance you can share your current code?
Let me know 🙂
May 24, 2018 at 9:59 pm #584141JosephHey 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
May 25, 2018 at 6:24 am #584385DavidStaffCustomer SupportHi 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
May 25, 2018 at 1:05 pm #584692JosephHi 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?
May 25, 2018 at 1:19 pm #584699DavidStaffCustomer SupportHi 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.
May 25, 2018 at 2:23 pm #584728JosephDave 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; ?>
May 25, 2018 at 4:06 pm #584777DavidStaffCustomer SupportHi 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.May 25, 2018 at 11:56 pm #584933JosephThat was it David, thank you for your assistance.
May 28, 2018 at 10:16 am #586438DavidStaffCustomer SupportGlad to hear you got it resolved.
-
AuthorPosts
- You must be logged in to reply to this topic.