• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Logo

impressive pages: Webdesign und eCommerce

  • Home
  • Blog
  • Hosting
  • Contact

Blog

WooCommerce product page without tabs, but everything below each other

22. December 2021 Leave a Comment

Tabs on WooCommerce product page
It’s about these tabs that appear on the product page

To remove the tabs (description, additional information and ratings) on the product page in WooCommerce or to place all information below one another, we use the following short code snippet.

By default, WooCommerce displays separate tabs for description, additional information and ratings on the product page. Sometimes it makes sense to do without tabs for usability reasons. Amazon and other large shops also show the content one below the other instead of in tabs. The approach comes from the mobile area and we have become very used to it. It is not wrong to orientate yourself to the big ones, as they have often already invested a lot in optimizing their presence and the potential visitors have already got used to it.

function woocommerce_output_product_data_tabs() {
	$product_tabs = apply_filters( 'woocommerce_product_tabs', array() );
	
	if ( empty( $product_tabs ) ) return;
	
	echo '<div class="woocommerce-tabs wc-tabs-wrapper">';
	foreach ( $product_tabs as $key => $product_tab ) {
		echo '<div id="tab-' . esc_attr( $key ) . '">';
		if ( isset( $product_tab['callback'] ) ) {
			call_user_func( $product_tab['callback'], $key, $product_tab );
		}
		echo '</div>';
	}
	echo '</div>';
}
WooCommerce product page tabs one below the other

As you can see in the example here, all information is displayed one below the other and the tab bar (as shown above) is not visible.

This gives the visitor an overview of all information at a glance.

What do you like better with tabs or with each other?

alternative solution

Alternatively there is this solution at gist.github.com . This has the disadvantage that the empty DIVs are still displayed, even if there is no content. This can of course also be solved in the code. With the above solution, tab content is only included if it is available.

Filed Under: development

Cool Genesis Mobile Menu Overlay

22. December 2021 Leave a Comment

If you prefer a full-page menu instead of a drop-down mobile menu, https://github.com/PurpleHippoDesign/genesis-menu-overlay is a possibility.

Thanks to @PurpleHippoDesign

Filed Under: Genesis framework, mobile

Solution for Google Search Console – Message: “brand” field is missing

22. December 2021 Leave a Comment

Feld "brand" fehlt

If you run a shop with WooCommerce you have certainly already discovered the message opposite in Google Search Console under Improvements -> Products.

By default, the WooCommerce plugin for WordPress does not add the “Brand” scheme to WooCommerce product pages. That means there is a loophole in the WooCommerce schema.

Various support threads on WordPress.org and Github say that this can be solved by buying a WooCommerce plugin. With something as basic as this one can be very frustrating, and rightly so.

Ultimately, WooCommerce’s justification is that these are not essential parts of the schema – they only generate warnings in the Google Search Console, but not errors. So in theory, they’re not a big deal.

However, if you want to close this loophole, you have several options. There are “schema plugins” out there to help you patch this up – the Yoast SEO WooCommerce plugin fills the gaps for you – but it is a bit of an exaggeration to spend around 70 euros a year for this. Unless you have or need it for another important reason. Then these instructions will help.

Many people avoid code-based solutions because they have to be “maintained” and break regularly. So for an ecommerce website that makes you money, that’s not great!

Google Search Console fix code – brand field warning

With the Code Snippets plugin , small code snippets like the following can be integrated into the page. Professionals have a separate plug-in for such adjustments or use the functions.php of their theme.

/*
* Füge "Brand"-Schema in die Strukturierten Daten ein
*/
function custom_woocommerce_structured_data_product ($data) {
	global $product;
	$data['brand'] = ['@type' => 'Brand', 'name' => 'Meine Marke'];
	return $data;
}
add_filter( 'woocommerce_structured_data_product', 'custom_woocommerce_structured_data_product' );

If you are the manufacturer of your products or if you only sell goods from one brand, you can insert your brand here instead of ” My brand ” (quotation marks must remain).

Alternatively, the brand can also be extracted from the Brand property with $ product-> read out get_attribute (‘pa_brand’) .

The code snippet would then look like this:

/*
* Füge "Brand"-Schema in die Strukturierten Daten ein
*/
function custom_woocommerce_structured_data_product ($data) {
	global $product;
        $data['brand'] = ['@type' => 'Brand', 'name' => $product->get_attribute('pa_brand') ?? null];
	return $data;
}
add_filter( 'woocommerce_structured_data_product', 'custom_woocommerce_structured_data_product' );

I am using a manufacturer’s product property for a customer. Therefore I set the “Brand” field with the manufacturer with the command $ product-> get_attribute (‘pa_manufacturer’) .

To test the success, use the practical online tool from Google: Test structured data .

Filed Under: Google Search Console, SEO, WooCommerce

Activate the block-based widget editor with Genesis> = 3.3.4

22. December 2021 Leave a Comment

Widgets editor
This is what the new widgets editor looks like from WordPress 5.8

With Genesis 3.3.4, StudioPress has implemented support for the new block-based widget editor. The new widget editor was added with WordPress version 5.8.

In order to be able to use the function , however, the following code must be inserted in functions.php:

//* Enable the block-based widget editor
add_filter( 'use_widgets_block_editor', '__return_true' );

More information is available here: https://my.studiopress.com/documentation/snippets/block-editor/enable-block-based-widget-editor/ (English)

Filed Under: Genesis framework, WordPress

What is the meaning of ‘schema “data-vocabulary.org” deprecated’?

22. December 2021 Leave a Comment

SEO

Google is currently sending out warnings about navigation path problems through Search Console recognized “.

With this, Google would like to point out that they are concentrating on the schema.org schema when developing the crawler and no longer support metadata from the outdated namespace data-vocabulary.org .

Google made the change on April 6, 2020. Since then, only the more widely used schema.org schema has been supported by the search engine.

What are structured data such as schema.org ?

Structured data are instructions to search engines about the specific meaning of data and how it relates to other data.

Without becoming too theoretical: This means that data can be given separately on one page. In the case of an eShop, for example, the title, article number, price, etc. can be given to the search engine without the crawler having to read out the information in the text on the page. The latter is not that easy at all. This might still be possible with prices, but with article numbers the question arises where it is and what does it look like. In order to solve the problem exactly, there is structured data (see also ontology at Wikipedia ).

Do I have to do something about it?

It is not entirely clear to me who exactly receives the message. Maybe they all get webmasters. If you have received this message, it does not mean that you have an acute problem.

If the CMS / ESHOP or the SEO plugin that you are using supports schema.org metadata, then you do not need to do anything else. If it is a current version, this should be the case. The developers of an actively developed system are usually in the know and develop the software according to the current standards.

To test structured data on your own data, Google offers the online tool to test structured data (external link). If data about products (in the case of an online shop), such as titles, prices, etc. appear, everything is fine.

The current version of WooCommerce supports the schema.org schema. WordPress can be supplied with structured data according to schema.org with the help of YOAST SEO. Further information is available from YOAST under this link: Structured data with Schema.org: the ultimate guide (external link).

Would you like to find out more about the topic? You can find another article on the subject at t3n.de (external link).

Filed Under: Google Search Console, SEO

Regenerate thumbnails in WordPress via WP-CLI

22. December 2021 Leave a Comment

Sometimes it is necessary to regenerate thumbnails or the images in smaller resolutions. This is necessary, for example, if you have changed the resolution values for the step sizes under Settings -> Media.

There are a number of plugins that do this for you, e.g. Regenerate Thumbnails . However, if you do not want to install a plug-in for this, there is an easy option via WP-CLI .

We initiate regeneration with the following command:

wp media regenerate

Now you have to confirm with yes via the console. To anticipate the question, there is the parameter –yes :

wp media regenerate ­­--yes

That’s it! Now we can watch the progress in the console output. By the way, WP-CLI can be used wonderfully in our hosting packages. Copy WP-CLI onto it, log in via SSH and use WP-CLI.

With WP-CLI, many tasks, such as time-controlled updates or backups, can be automated. Feel free to contact me, I would be happy to support you.

Filed Under: development, WordPress, WordPress, WordPress

  • « Go to Previous Page
  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to page 4
  • Go to Next Page »

Primary Sidebar

Search

Recent Posts

  • WooCommerce: Show free shipping only
  • Remove wrapper DIVs (.wrap) in Genesis
  • Remove the number of products in the category list from the category name
  • Change the number of similar products in WooCommerce
  • Genesis Visual Hook Guide

Categories

  • development
  • Genesis framework
  • Google Search Console
  • mobile
  • SEO
  • Uncategorized
  • Web hosting
  • WooCommerce
  • WordPress

Archives

  • May 2022
  • January 2022
  • December 2021
  • imprint
  • Data protection

Footer

!pages
Heinrich Franz
Wilhelm-Martin-Str. 4
76356 Weingarten (Baden)
instagram
+49 160 85 40 725
info@impressive-pages.de

In my Blog I publish articles about WordPress, Genesis framework und SEO.

© 2022 impressive pages

  • Deutsch