How to display the category part before the delimiter

I wish to seperate the text I have on my woocoomerce catagory page by a delimiter.

I can see in my archive-product.php page that,

Read More
do_action( 'woocommerce_archive_description' );

But I don’t want to echo the whole thing at one place. I want to display the part before the delimiter in the top and the part after the delimiter in the bottom.

Coding example of what I would like to do:

$explode_arr = explode('||', $text_from_category_page);

//Top of page
echo $explode_arr[0];

//Bottom of page
echo $explode_arr[1];

Related posts

1 comment

  1. I have found a solution – don’t know if it is the right way to do it, but it works!

    $explode_arr = explode('[delimiter]',category_description());
    
    echo $explode_arr[0];
    echo $explode_arr[1];
    

Comments are closed.