This is a tough one...
I need some help to add sliders, images and text content to the top of each of my Woocommerce Category pages. Making matters more complicated, each Woocommerce Category requires different images and text. And making matters even more complicated, I'd like the content that I insert at the top of each Woocommerce Category page to be editable by our webmasters.
The solution that I am imagining is to surgically insert a standard Wordpress Page that I have specifically created for each Woocommerce category immediately above the product loop on each corresponding Woocommerce Category page.
Visualize a Woocommerce category called 'Dresses' which renders a Woocommerce Category page in my shop called 'Dresses'. There is also a special Wordpress Page called 'Dresses' with the slider and text that I want to appear above the Woocommerce product loop. Now visualize the content div from my Wordpress 'Dresses' page being embedded into the top of the Woocommerce 'Dresses' Category page directly above the Woocommerce product loop.
I realize this all sounds very complicated but I have spent a good deal of time inspecting the code and I think I have a good general understanding of how to achieve this.
My game plan is to insert a call to get_template_part( 'includes/loop', 'page' ); into the function woocommerce_product_taxonomy_content() in woocommerce-template.php. This call would be inserted immediately before the call to woocommerce_get_template_part( 'loop', 'shop' ); Could you please confirm whether or not this is the correct approach.
Also, if this is the correct approach, how do I make the call to get_template_part( 'includes/loop', 'page' ); with a specific page ID that is not the page the user is currently viewing? This is critical because, from the Wordpress perspective, the user is currently viewing the Woocommerce 'Dresses' Category page and not the Wordpress 'Dresses' page that I am trying to embed. As such, Wordpress doesn't have access to the page ID for the Wordpress 'Dresses' page that I am trying to embed so I will need to provide that to get_template_part programatically. How do I do this?
I realize that this is some advanced coding here but I appreciate any help you can provide. Thank you.














