Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi AudreyAzerty

    for your first question, you can use the code below to add content after the shop:

    function woa_content_after_shop() {
    	echo "<p>Insert your Content here...</p>";
    }
    
    add_action( 'woocommerce_after_shop_loop', 'woa_content_after_shop');

    the code utilizes the woocommerce_after_shop_loop action hook. This is called after the product loop in the Shop page. You’ll just have to add this code on your theme’s function.php. Much better if your theme has an area for custom functions.

    For your second question, you can use CSS to customize it.

    .woocommerce-page #payment #place_order { INSERT CUSTOM CSS HERE }

    You’ll have to do this on your theme’s custom CSS file.

    Hope this helps.

    hi wooassist
    thanks for your code. it works.
    my shop only lists the subcategories. what i want to do is to add the content before and after the subcategory page. i want to assign different description content for each sub category. do you know how to do that?
    joe

    Hey Joe, it would be better if you can create a new topic for your own issue. But to answer your query, that would really depend on the theme you are using. If you use a theme like Storefront, you can easily add custom content for each of your description.

    If you have some coding skills, you can also customize your theme as well and add a content sections for your categories. You can add this PHP code to your category template:

    <?php
    // Show an optional term description.
    $term_description = term_description();
    if ( ! empty( $term_description ) ) :
    	printf( '<div class="taxonomy-description">%s</div>', $term_description );
    endif;
    ?>

    Hope this helps!

    Hey Joe, it would be better if you can create a new topic for your own issue. But to answer your query, that would really depend on the theme you are using. If you use a theme like Storefront, you can easily add custom content for each of your description.

    If you have some coding skills, you can also customize your theme as well and add a content sections for your categories. You can add this PHP code to your category template:

    // Show an optional term description.
    $term_description = term_description();
    if ( ! empty( $term_description ) ) :
    	printf( '<div class="taxonomy-description">%s</div>', $term_description );
    endif;

    Hope this helps!

    Hi.

    I also have a problem adding content under the product page.

    I tried using this code in the function.php:

    function woa_content_after_shop() {
    echo “<p>Insert your Content here…</p>”;
    }

    add_action( ‘woocommerce_after_shop_loop’, ‘woa_content_after_shop’);

    and it works, but when trying to add Images (<img src=”…) or links (<a hrefs=”…) it cause an error and I would have to go through FTP to remove the codes to get it working again.

    I tried asking WooCommerce for support, they told me to create a new page and use Shortcodes, which I tried but the simple [products per_page=”12″ column=”4″] will not work, it displays the entire product inventory still with no options.

    Is there another code to add to the functions.php?

    Thanks

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Why not paste your broken image code? Sounds like you’re adding nested double quotes.

    Thanks for the reply.

    Here’s the error:

    Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /home/content/r/a/d/xxxxxxxx/html/wp-content/themes/my-primashop-wc/functions.php on line 21

    xxxxxxxx is the website. I can display this too if needed.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    No, your code. I think you’re adding double quotes inside the echo “…”

    Wow. That was simple. It works. I changed it to single quotes ‘…’

    Thanks Mike!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Content under page shop’ is closed to new replies.