[Resolved] Page Header Addon Not Working On WooCommerce Pages

Home Forums Support [Resolved] Page Header Addon Not Working On WooCommerce Pages

Home Forums Support Page Header Addon Not Working On WooCommerce Pages

Viewing 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • #165347
    Jose Carlos

    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

    #165409
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Would every category show the same text?

    #165439
    Jose Carlos

    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

    • This reply was modified 8 years, 3 months ago by Jose Carlos.
    #165475
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #187946
    Ornulf Hjort-Sorensen

    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

    #188044
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #188060
    Ornulf Hjort-Sorensen

    Thanks again.
    Orn-

    #188148
    Tom
    Lead Developer
    Lead Developer

    No problem πŸ™‚

    #258438
    David

    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!

    #258525
    Tom
    Lead Developer
    Lead Developer

    Hi David,

    You could try something like this:

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

    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);
    }

    #258880
    Tom
    Lead Developer
    Lead Developer

    Awesome, thanks for posting your code πŸ™‚

Viewing 12 posts - 16 through 27 (of 27 total)
  • You must be logged in to reply to this topic.