Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1395602

    Hey guys,

    we’re trying to build a simple product page with the Advanced Layout Builder (ALB) and I see that there’s an entire new tab in the ALB called “Plugin Additions”. However, this tab looks a little empty and it seems to me as if some of the most simple building blocks are missing, e.g the Product Title. I know I’m able to manually add a heading, but this shop will have hundreds of products, which is why we need each product page to automatically show the product title by itself.

    I’ve looked through the enfold and woocommerce documentation, but couldn’t find any shortcodes, scripts or anything else that would solve my problem.

    • This topic was modified 1 year, 9 months ago by tixxpff.
    #1395750

    Hey tixxpff,
    Thank you for your question, when you manually create a product with the Advanced Layout Builder you will use other elements such as the special heading to add the product title, this is by design. The ALB meant to give you the ability to create custom layouts such as this one and here is another example
    You can also use Shortcodes included with WooCommerce, but unfortunately WooCommerce doesn’t have a shortcode for displaying a product name, however, you can create your own by adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function displayProductName($item) {
         global $post; 
        $product_title = get_the_title( $post->ID );
        return $product_title; 
    }
    add_shortcode('product_name', 'displayProductName');

    and use this shortcode [product_name]
    Enfold_Support_218.jpeg

    Best regards,
    Mike

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.