WooCommerce Side bar issue
-
Hello,
First off you guys are awesome and I wish I could just get an ecommerce plugin from you. But since that’s not an option I need your help with WooCommerce.
I loaded the plugin and am setting up my store (having multiple issues) the first big problem I’m having is on the product pages defaults to a woocommerce template therefore making my graphene page layout disappear. The sidebar widget area moves to the bottom of the page. I have added the following code into the child function.php file and it does not seem to be working. What am I doing wrong? I don’t know much coding but I am learning as I go.
<?php
function graphene_custom_header_width(){
return 1024;
}
function graphene_custom_header_height(){
return 150;
}
add_filter('graphene_header_image_width', 'graphene_custom_header_width');
add_filter('graphene_header_image_height', 'graphene_custom_header_height');
?>
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
<?php
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action('woocommerce_before_main_content', 'graphene_before_page_content', 10);
add_action('woocommerce_after_main_content', 'graphene_after_page_content', 10);
function my_theme_wrapper_start() {
echo '<div class="entry-content clearfix">';}
?>THANK YOU so much for your help!
ModPut code in between backtick (
Code:`) characters. It’s usually located above the Tab key on your keyboard.
The second opening php tag is unnecessary, as is the first closing php tag. You have excluded your first two
remove_action
s and they are just printing directly to your page.Quote:The sidebar widget area moves to the bottom of the page.Probably because you are echoing a
<div>
opening tag without closing it later in the page.Header width and height are theme options; you shouldn’t need to specify them here.
This is what I’ve got and its still not working. The sidebar is still at the bottom of the page on the product pages
<?php
function graphene_custom_header_width(){
return 1024;
}
function graphene_custom_header_height(){
return 150;
}
{
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
}
{
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action('woocommerce_before_main_content', 'graphene_before_page_content', 10);
add_action('woocommerce_after_main_content', 'graphene_after_page_content', 10);
}
function my_theme_wrapper_start() {
echo '<div class="entry-content clearfix">';}
?>http://66.147.244.89/~leaddog1/product-category/allied/allied-730/
ModPut code in between backtick (
Code:`) characters. It’s usually located above the Tab key on your keyboard.
Quote:The sidebar is still at the bottom of the page on the product pagesYes. And I said that
Quote:Probably because you are echoing a <div> opening tag without closing it later in the page.Look at your code. Nowhere is there a
</div>
in there. Without closing the div, the sidebar will move to the bottom of the page.
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.