Viewing 6 posts - 1 through 6 (of 6 total)
  • #128577
    travwaite
    Member
    Post count: 21

    Hi guys,

    I browsed through a number of the other topics but can’t seem to get the answer I’m looking for…

    I want to move the title from the page title location to above the price. Not change appearance, just the location.

    Thanks

    #128595
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Add this to your custom css:

    .woocommerce div.product .entry-title {
      display: block;
      margin-bottom: 10px;
    }

    Open up content-single-product.php in the woocommerce folder and replace:

    <div itemscope itemtype="http://schema.org/Product" id="product-<?php the_ID(); ?>" <?php post_class(); ?>>
        
        <div class="entry-title" itemprop="name"><?php the_title(); ?></div>
    
        <?php
            /**
             * woocommerce_show_product_images hook
             *
             * @hooked woocommerce_show_product_sale_flash - 10
             * @hooked woocommerce_show_product_images - 20
             */
            do_action( 'woocommerce_before_single_product_summary' );
        ?>
    
        <div class="summary entry-summary">
            
            <div class="summary-top clearfix">
                
                <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
                
                    <p itemprop="price" class="price"><?php echo $product->get_price_html(); ?></p>
                    
                    <meta itemprop="priceCurrency" content="<?php echo get_woocommerce_currency(); ?>" />
                    
                    <?php if (!$catalog_mode) { ?><link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" /><?php } ?>
                
                </div>

    with this:

    <div itemscope itemtype="http://schema.org/Product" id="product-<?php the_ID(); ?>" <?php post_class(); ?>>
        
        
    
        <?php
            /**
             * woocommerce_show_product_images hook
             *
             * @hooked woocommerce_show_product_sale_flash - 10
             * @hooked woocommerce_show_product_images - 20
             */
            do_action( 'woocommerce_before_single_product_summary' );
        ?>
    
        <div class="summary entry-summary">
            
            <div class="summary-top clearfix">
    
                <div class="entry-title" itemprop="name"><h1><?php the_title(); ?></h1></div>
                
                <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
                
                    <p itemprop="price" class="price"><?php echo $product->get_price_html(); ?></p>
                    
                    <meta itemprop="priceCurrency" content="<?php echo get_woocommerce_currency(); ?>" />
                    
                    <?php if (!$catalog_mode) { ?><link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" /><?php } ?>
                
                </div>

    Let me know if it works, if not, please provide a link and login

    – Kyle

    #128654
    travwaite
    Member
    Post count: 21

    Spot on Kyle.

    Thanks!

    #128674
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem

    #308681
    gflwrg
    Member
    Post count: 113

    Is this still valid please? I can’t seem to find this in my content-single-product.php

    Please help

    #308683
    David Martin – Support
    Moderator
    Post count: 20834

    This is a very old thread. Please do not thread bump, create a new ticket as you have done and we will answer.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register