Tagged: woocommerce
- This topic has 10 replies, 5 voices, and was last updated 10 years, 1 month ago by Theme Horse Support Team.
-
AuthorPosts
-
March 27, 2014 at 5:38 pm #9063haddenjwParticipant
All,
I’m looking to integrate woocommerce into my Attitude Free theme. I’m having a bit of trouble. I would like to edit the correct file in my child theme to replace the loop <?php if ( have_posts() ) : and <?php endif; ?> with woocommerce’s <?php woocommerce_content(); ?>
However, I can’t find the <?php if ( have_posts() ) : and <?php endif; ?> to edit in my theme.
Could someone point me in the right direction?
Thanks!
March 30, 2014 at 4:51 pm #9131Rabin ShresthaParticipantHi haddenjw,
You can find the content code in attitude->library->structure->content-extensions.php
March 31, 2014 at 8:58 pm #9158haddenjwParticipantRabin,
Thanks so much for your help. Two questions:
First, how should I go about overriding content-extensions.php in my child theme? I’m not sure how to add files to my child theme that are in a separate folder in the parent theme (for example, “Library”).
Second, is this the approach I’ve outlined above the best approach to integrating woocommerce into a themehorse theme? If so, is there a discussion somewhere which outlines how to integrate woocommerce into themehorse step-by-step?Thanks!
April 1, 2014 at 12:12 pm #9164Theme Horse Support TeamKeymasterHi haddenjw
You need to make child theme and extract the particular function.
https://codex.wordpress.org/Child_Themesand for your second question there you can study our instruction how to implement theme.
https://www.themehorse.com/theme-instruction/attitude/
Regards
Sunil
April 3, 2014 at 6:31 pm #9239haddenjwParticipantThanks so much for the help. Unfortunately, I’m still having trouble. What I am trying to achieve is outlined on this website underneath “Replace Loop” I can’t seem to find where this code is in the Themehorse Theme. Could someone help me? Or, point me in the direction of a step-by-step instruction?
http://docs.woothemes.com/document/third-party-custom-theme-compatibility/
April 3, 2014 at 7:05 pm #9240haddenjwParticipantOk, I did find the right code under content-extensions. Now, could someone help me find exactly which code to remove and replace with
<?php woocommerce_content(); ?>
This would be a tremendous help. My site is here: http://www.thebefreelife.com and, as you can see the SHOP Page looks broken at the moment due to the loop.
April 9, 2014 at 1:26 pm #9380Rabin ShresthaParticipantHi haddenjw,
Our theme is not woocommerce compatible and you may have to edit and create new files for this to make it compatible. Just replacing the_content with woocommerce_content will not work and possibly will break other pages. So we request you to hire someone who is capable of making such changes.
July 8, 2014 at 11:33 am #11988magenta-heavenParticipantI have a solution. Here are URLs where you need to make changes. And these changes.
1. In file /wp-content/themes/attitude/library/structure/content-extensions.php add this code:/****************************************************************************************/
add_action( ‘attitude_woo_container’, ‘woo_content’, 10 );
/**
* Function to display the content for the single post, single page, archive page, index page etc.
*/
function woo_content() {global $post;
global $attitude_theme_options_settings;
$options = $attitude_theme_options_settings;
if( $post ) {
$layout = get_post_meta( $post->ID, ‘attitude_sidebarlayout’, true );
}
if( empty( $layout ) || is_archive() || is_search() || is_home() ) {
$layout = ‘default’;
}if( ‘default’ == $layout ) {
$themeoption_layout = $options[ ‘default_layout’ ];get_template_part( ‘content’,’woocommerce’ );
}
}
/****************************************************************************************/2. Copy and rename file /wp-content/themes/attitude/content-leftsidebar.php -> /wp-content/themes/attitude/content-woocommerce.php
3. In file content-woocommerce.php change this:
<div id=”primary”>
<?php woocommerce_content(); ?>
</div><!– #primary –>4. In woocommerce.php change this:
<div id=”container”>
<?php
/**
* attitude_woo_container hook
*
* HOOKED_FUNCTION_NAME PRIORITY
*
* attitude_content 10
*/
do_action( ‘attitude_woo_container’ );
?>
</div><!– #container –>If you can improve this code – I’ll be grateful
July 8, 2014 at 1:45 pm #11992Theme Horse Support TeamKeymasterhi magenta-heaven,
Thanks a lot for you help and support.
Thank you!
October 15, 2014 at 10:29 am #17547d.fiebig89ParticipantIs there also a solution for the interface theme? Many thanks for any help!!
Dave
October 16, 2014 at 7:39 am #17587Theme Horse Support TeamKeymasterHi d.fiebig89,
Our interface theme is also not compatible with woo commerce.Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.