Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
add text with function only to certain category WooCommerce « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

add text with function only to certain category WooCommerce

(2 posts)
  • Started 2 years ago by mrmikeman
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. mrmikeman
    Member

    Im making a site with WooCommerce and Thematic, i always get stuck on adding functions/hooks...

    I need to add text on top of my Shop page/ Home page as well as different text on top of Category pages but all different text.. i know this can be done with some conditional statements.. but even using the wp codex things dont seem to want to work

    this is my current code

    function home_content()
    {
         echo '<strong>My Text Here';
    }
    
    add_action('woocommerce_before_shop_loop_item_title', 'home_content');

    maybe the reson i couldnt do it is cause, is_home which i used before, is not right since my Home is actually my "shop" according to WooCommerce...

    could someone wrap that code for me conditionally for the home/shop and category pages?

    Thank you!

    Posted 2 years ago #

  2. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    1. please note that thematic has moved to www.thematictheme.com and all future questions should be posted there.

    2. i can't really see how this is a thematic question since you are adding content to a woocommcerce hook and wondering about wordpress conditional logic, but i suggest looking in the woocommerce docu for conditional / template tags... i want to say is_shop() exists()

    is_home() actually refers to your BLOG home.

    is_front_page() is always the front page.

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183