Forum Replies Created
- Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236
webbrewers
ParticipantDeprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 2432Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236Warning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220The site I was working on is finished and I no longer have access but to get woo/theme compatibility you need to follow those directions to replace the wrapper element woo uses with what the theme uses. So look at page.php to see what the theme uses to start the content area. Chances are it’s <div id=”content” class=”site-content”> so try:
function my_theme_wrapper_start() {
echo ‘<div id=”content” class=”site-content”>’;
}function my_theme_wrapper_end() {
echo ‘</div>’;
}- This reply was modified 9 years, 6 months ago by webbrewers.
AdvertismentDeprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236webbrewers
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220Hi,
Pretty sure I used the woo commerce featured products shortcode to get products on the home page.
Is that what you needed to know?Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236webbrewers
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220I would think the footer would be more often thought of as a “global” element, not template specific. So an option to select content for the footer and make it apply to all templates would do the trick.
I find all admin pages are rather slower than most themes I’ve tried.Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236webbrewers
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220That’s a good idea and seems to work fine. I’ve done that before but it didn’t occur to me this time!
Thanks for sticking with it!Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236webbrewers
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220By “custom query” I mean the theme’s custom query widget. In short, I want to display a selection of woo products on the home page.
I added a theme custom query widget to the “home main” sidebar location.
Settings:
Type: List
Grid: 4 columns
Query: Post type archive
Post type: product
# entries : 4
# leading entries: this defaults to 4
What this produces is:
Product title
Product description
I want to also display the thumbnail, price and add to cart button.
If you can point me to where the html is generated, I can figure it out.Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236webbrewers
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220Thanks, I already did that part to make the woo pages compatible but when using the product post type in a widget custom query, only the title and description are pulled in. What I’d like to show also are the thumbnail, price and add to cart button. In other words, to make it look like a woo category/archive page.
What I add in other themes is the following but I’d prefer to utilize the custom query option in Enlightenment, if possible. I just don’t see where to alter the query:<ul class=”products”>
<?php
$args = array( ‘post_type’ => ‘product’, ‘stock’ => 1, ‘posts_per_page’ => 5, ‘meta_key’ => ‘_featured’, ‘meta_value’ => ‘yes’ );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?><li class=”product type-product status-publish featured”>
<a id=”id-<?php the_id(); ?>” href=”<?php the_permalink(); ?>” title=”<?php the_title(); ?>”>
<h3><?php the_title(); ?></h3>
<div class=”prod-top”></div>
<?php if (has_post_thumbnail( $loop->post->ID )) echo get_the_post_thumbnail($loop->post->ID, ‘shop_catalog’); else echo ‘<img src=”‘.woocommerce_placeholder_img_src().'” alt=”Placeholder” width=”65px” height=”115px” />’; ?>
<br /><span class=”price”><?php echo $product->get_price_html(); ?></span>
</a>
<br />
<?php woocommerce_template_loop_add_to_cart( $loop->post, $product ); ?>
</li><!– /span3 –>
<?php endwhile; ?>
<?php wp_reset_query(); ?></ul>