Site logo

Archived topic

Page Header Addon Not Working On WooCommerce Pages

26 replies · Started by Anonymous on April 25, 2015

Viewing posts 16–27 of 27

Hey there,

I've done what you put me and not working. I've seen what he's done Zoe and neither works for me. Besides all the areas I have done well. I just want it to appear in "categories". If hook would use under all pages and just want to come out in "categories".

I want it to look like this:

http://dominamos.es/clientes/estudioflamenco-d/tienda/wp-content/uploads/2016/01/capture.png

At home I have section below the menu bar with an explanatory statement and I can only that page. There is no way you can do it only on that page. For me it is necessary to leave everything the same.

Thank you

Hi there,

Would every category show the same text?

Hey there,

Not in each different one, I'll show each screen as I have and I only need to customize the category page, but will not let me.

Screen1: http://dominamos.es/clientes/estudioflamenco-d/tienda/wp-content/uploads/2016/01/screen1.png
Screen2: http://dominamos.es/clientes/estudioflamenco-d/tienda/wp-content/uploads/2016/01/screen2.png
Screen3: http://dominamos.es/clientes/estudioflamenco-d/tienda/wp-content/uploads/2016/01/screen3.png
Screen4: http://dominamos.es/clientes/estudioflamenco-d/tienda/wp-content/uploads/2016/01/screen4.png
Screen5: http://dominamos.es/clientes/estudioflamenco-d/tienda/wp-content/uploads/2016/01/screen5.png

As you can see on every page I show a different explanatory text but in "categories" (Screen2) can not.

You hope you can help me, thanks

In GP Hooks, try this in the "After Header" hook:

<?php if ( is_category() ) : ?>
    Your HTML for the text area in categories here.
<?php endif; ?>

Then check the "Execute PHP" checkbox.

That will add it to all category pages.

To specify a category, add the ID into is_category() like this: is_category( 2 ).

More info here: https://codex.wordpress.org/Function_Reference/is_category

Let me know if you need more info :)

Thanks, Tom

- good to hear.

The code you refer puts only text into a heading, or...?

Anyway, in which field/heading should I place it. (the term for the Box I'm talking of). ?

All the best

The above would add it below the header - above where the category title and posts are.

I'm not sure if it's possible to add it inside where the title is without me adding another hook in there.

I'll look into it :)

Thanks again.
Orn-

No problem :)

Hi Tom,

For adding a Layerslider, I put your code in the GP Hooks (after header fiel) and it works well, thanks!, for the shop pages and the product-category pages. see there: https://www.artinprovence.fr/shop/
I use a shortcode inlace of the image source with no problem.

My only problem is to get the right css class. I want the slider to stand behind the navigation and keep this one transparent like on the other pages o the site (see: https://www.artinprovence.fr/book/).
I can't find the right css. Can you help?

Thanks!

Hi David,

You could try something like this:

.woocommerce .site-header {
    position: absolute;
    z-index: 100;
    width: 100%;
}

Hi Tom,

it works fine, thanks!
I just had to add style for the background color and transparency.
The final style that can be used is this one:

.woocommerce .site-header {
position: absolute;
z-index: 100;
width: 100%;
background: rgba(123, 144, 171, 0.6);
}

Awesome, thanks for posting your code :)

This archived topic is closed to new replies.