Quality resources for your expert teams
We recruit and train software engineers to equip the tech departments of technology companies.
To ensure good SEO performance many WordPress sites are equipping themselves with the Rank Math plugin. Learn about the opportunities of this all-in-one SEO solution combined with the professional theme Flatsome.
Are you a pro? Go directly to the integration section.
When it comes to building a showcase or e-commerce site, more than 40% of Internet users choose the CMS (Content Management System) WordPress associated with a theme and some extensions.;
The simple yet flexible technological foundation that WordPress offers allows many brands and projects to build high-performance, well-referenced storefront and e-commerce sites.
🙋♂️ What is “good SEO”?
The web is large and the sites are numerous. Search engines like Google and Microsoft’s Bing allow Internet users to navigate through this mass of information using keywords and phrases.
Indeed, when you type “Programisto Bordeaux” for example, you will find more information about us than by typing “Tech Bordeaux“.
The relevance of your site’s positioning in this keyword market is crucial: this is called SEO for Search Engine Optimization.
There are many free and paid extensions on the WordPress store that allow you to improve your SEO score with the help of modules that are more or less easy to handle. The world leader in this specific market is called Rank Math SEO and it is this plug-in – in free version – in particular that we will study through this article.
To know: we use Rank Math on all WordPress sites produced by Programisto and Brumisphere: programisto.fr, brumisphere. com, lahorde.tech, bijouxcailloux.fr, aucomptoiriberique.com…
Rank Math is powerful, lightweight, comprehensive and easy to use. Moreover, the extension is updated very regularly by the tech team which gives it an unparalleled reliability and edge over its direct competitors.
Rank Math will serve you notably for:
Choosing a theme remains a determining point in the construction of your site on WordPress, whether it is simply a storefront or e-commerce or even specialized in an industry. To each theme its specificities, its SEO performance, its complexity and its exclusivities.
Flatsome is a theme specialized in e-commerce that adapts to many situations. Its built-in content builder and ultra-lightweight structure ensure flexibility and performance that is very attractive and fun to work with.
With a fixed price of $59, Flatsome remains one of the #1 themes on WordPress and even more so when it comes to pairing the Woocommerce extension with your site.
Installing Rank Math on your WordPress site takes just over 2 minutes.
In most cases, it’s best to download the plugin directly from the admin panel. This is the standard method and WordPress automates some of the steps for you.
There is only one drawback to installing via the panel: some servers are configured to reject downloads of files over a certain size. So you may get error messages when you try to install larger plugins this way.
This isn’t a big deal – if you can’t install Rank Math via WP Admin, you can switch to the method using FTP.
The rest of the setup is both very simple and (almost) endless. Indeed, the extension is very complete and allows you to push positioning opportunities in a professional way.
A set-up can take between 3 days and several weeks depending on the size of the site and its content, its SEO strategy and its degree of customization and recurrence of updates.
Here are the main steps of this simplified startup with the configuration wizard:
The official Rank Math website presents this implementation in detail here.
This article only presents the basics of using the plugin. However, it is essential to keep in mind that such a powerful tool says to be monitored, adapted, updated recurrently by an operator such as a webmaster.
Advanced and regular use will allow you to observe evolutions in your website’s SEO positioning and target certain placement opportunities, adapt your content accordingly and rise in search results more quickly.
This tutorial presents an extremely specific case study; each SEO strategy must be finely tuned to the brand’s desired goals. The extension and solutions presented within this article represent only a tiny part of the endless world of SEO work.
The Programisto team are experts in these tools and will give you operational control worthy of a company taking control of its SEO and not the other way around!
Indicate your email and the link to your website. Our team will perform a performance and SEO audit of your site within 48 hours and email it to you.
After this quick overview from the installation of the extension to its first setting, let’s focus on its full integration with the Flatsome WordPress theme.
Warning: in order to perform these methods by yourself, it is necessary that the Flatsome theme is installed on your site. You can easily find it online for a small fee – well deserved.
First of all, as previously mentioned, the association between WordPress, Rank Math and Flatsome makes it possible to go very far in terms of power and precision and this for any type of site – from e-commerce to showcase sites.
Benefits in terms of scalability and sustainability
Ergonomic and SEO benefits
First, go to the Rank Math tab in the Back Office dedicated to breadcrumbs:
Rank Math > General Settings & Breadcrumb
And enable the option on your site. Then set the basic options.
There are several lines of code you need to know to properly integrate Rank Math breadcrumb trails on Flatsome. Indeed, we noticed that some pages / articles were not displaying the right sequence of content and links.
For example, Flatsome portfolios display by default only one level of content: the one you are navigating on. So the role of this navigation element no longer serves its purpose as a facilitator. In fact, the breadcrumbs of the Rank Math extension are not even present on these portfolio pages.
We will first present the generic code provided by Rank Math to manipulate breadcrumbs, before looking at specific examples on Flatsome later in this article.
Code #1: add the Rank Math breadcrumb trail to an archive (blog posts and portfolio)
It is not possible to add breadcrumbs on WordPress structured content such as blog posts, portfolios or their archives (tags, categories, search results) via the classic editor of WordPress.
Indeed, it is necessary to edit directly the template of these elements, present in the theme.
Rank Math provides this code to be inserted – in the right place – within your theme:
<?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs(); ?>
Code #2: filter a breadcrumb trail and add the level of your choice
On some pages, it is necessary to manually add a level on the breadcrumb trail, either at the beginning in the center or at the end of the breadcrumb trail and this with any link.
Rank Math provides this code to insert – at the right place – within your theme:
/** * Allow changing or removing the Breadcrumb items * * @param array $crumbs The crumbs array. * @param Breadcrumbs $this Current breadcrumb object. */ add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) { //Adding to single posts if(is_singular('post')){ //pass an array containing the name of the crumb, URL and //hide_in_schema option $value[] = array( 'Accueil', 'https://programisto.fr', 'hide_in_schema' => false ); //add this value as the second item in array array_splice( $crumbs, 0, 0, $value ); return $crumbs; } return $crumbs; }, 10, 2);
To choose the level where you want to place the new breadcrumb level, change the first number in this line:
array_splice( $crumbs, 0, 0, $value );
For example, to place it on the second level, the code would be:
array_splice( $crumbs, 1, 0, $value );
Code #3: Delete a level in the Rank Math breadcrumb trail
We have noticed that some changes made on product archives also impact Woocommerce “My Account” pages using Flatsome and its breadcrumb trail.
Keep in mind that when customizing your structure via code, it is necessary to properly assign changes to the right content. Filters exist for this, they are used in our examples at the beginning of the code; they start with “IF”. The code is then triggered only on the content specified after this “IF”. Manipulating the code and your theme is a risky maneuver – quickly done by pros. Never forget to make a backup and to test your whole site after any change!
Use case: here is an example of code to remove the second breadcrumb element within Woocommerce product pages; code to insert – in the right place – within your theme.
/** * Allow changing or removing the Breadcrumb items * * @param array $crumbs The crumbs array. * @param Breadcrumbs $this Current breadcrumb object. */ add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) { if(is_product() || is_product_category()){ unset($crumbs[1]); $crumbs = array_values($crumbs); return $crumbs; } return $crumbs; }, 10, 2);
In the same way as in the case of code #2, if you want to change the target level use this line and change the number 1:
if(is_product() && isset($crumbs[1])){unset($crumbs[1]);
For example to remove the first level (homepage):
if(is_product() && isset($crumbs[0])){unset($crumbs[0]);
If you do not use the provided shortcodes, it is necessary to place the custom code in the right place within your theme.
Portfolio and blog pages do not natively display the Rank Math breadcrumb trail. To replace them and display a relevant navigation element, you need some templates-parts
by inserting the code #1 or the classic PHP method to add the shortcode.
You will have to add these new files via FTP.
Once you have these file additions within Flatsome’s child theme, a few adaptations are necessary. Indeed, the embedded breadcrumbs will not directly reflect the desired content, and you will have to use the codes provided by Rank Math to permanently adapt your structure.
You will then need to add the custom code within the functions.php
file of the child-theme.
The first example and necessary change to make when integrating Rank Math breadcrumb trails on Flatsome concerns the types of publications Portfolio.
In the example below:
/********************************************************/ // Change Portfolio Name in Rank Math Breadcrumbs + redirect URL + translations /********************************************************/ add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) { $currentlang = get_bloginfo('language'); if ( is_singular( $post_types = 'featured_item' )) { if ($currentlang=="fr-FR" ) { $modifiedCrumb = array( "0"=>esc_html('Réalisations'), "1"=>esc_url('/realisations/'), "hide_in_scheme"=>false ); $crumbs[count($crumbs)-3] = $modifiedCrumb; } elseif ( $currentlang=="en" ) { $modifiedCrumb = array( "0"=>esc_html('Achievements'), "1"=>esc_url('/en/achievements/'), "hide_in_scheme"=>false ); $crumbs[count($crumbs)-3] = $modifiedCrumb; $modifiedCrumb1 = array( "0"=>esc_html('Home'), "1"=>esc_url('/en/'), "hide_in_scheme"=>false ); $crumbs[count($crumbs)-4] = $modifiedCrumb1; } } return $crumbs; }, 10, 2);
Then, we add a second level to the Portfolio publication type archives in French and English as follows:
/** * Add second level in portfolio-archive breadcrumbs */ function is_featured_item_archive () { return ( is_archive()) && 'featured_item' == get_post_type(); } add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) { $currentlang = get_bloginfo('language'); if(is_featured_item_archive() && $currentlang=="fr-FR"){ $value[] = array( 'Réalisations', '/realisations/', 'hide_in_schema' => false ); array_splice( $crumbs, 1, 0, $value ); return $crumbs; } elseif (is_featured_item_archive() && $currentlang=="en") { $value[] = array( 'Achievements', '/en/achievements/', 'hide_in_schema' => false ); array_splice( $crumbs, 1, 0, $value ); return $crumbs; } return $crumbs; }, 10, 2);
Bonus: some tips & tricks with a use of WooCommerce
Hide the first level of product archives – once portfolios are customized, an additional level is added to the product sheets that must be manually removed.
/** * Hide first level in product-archive breadcrumbs */ add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) { if(is_product() && isset($crumbs[1])){ unset($crumbs[1]); $crumbs = array_values($crumbs); return $crumbs; } return $crumbs; }, 10, 2);
Work on Woocommerce My Account pages to show the homepage, My Account page and navigation details.
/** * Work on woocommerce my account breadcrumbs */ add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) { global $wp; $request = explode( '/', $wp->request ); if ( ! ( end($request) == 'compte' ) && is_wc_endpoint_url() ) { $endpoint = WC()->query->get_current_endpoint(); switch ($endpoint) { case "downloads": $endpoint_title = "Mes téléchargements"; break; case "orders": $endpoint_title = "Mes commandes"; break; case "edit-address": $endpoint_title = "Mes addresses"; break; case "edit-account": $endpoint_title = "Tableau de bord"; break; case "payment-methods": $endpoint_title = "Moyens de paiement"; break; default: $endpoint_title = ""; break; } $modifiedCrumb = array( "0"=>esc_html(''.$endpoint_title.''), "1"=>esc_url(''), "hide_in_scheme"=>false ); $crumbs[count($crumbs)-1] = $modifiedCrumb; $value[] = array( 'Mon compte', '/compte/', 'hide_in_schema' => false ); array_splice( $crumbs, 1, 0, $value ); return $crumbs; } return $crumbs; }, 10, 2);
Google requires the use of a specific Schema (structured data model) for products.
The Product Schema has mandatory properties including:
And recommended properties:
The referencing consists, in a sense, in providing the most information about its data. That is why the recommended properties are not to be neglected in order to obtain a good referencing on them.
Rankmath offers full compatibility between Woocommerce input and Product Schema input.
Rankmath > Dashboard > Schema (structured data)
Image Box text
Settings > Products > Schema Type > Enable “Woocommerce Product”
Image Box text
However, Schema Category data should be disabled to avoid a conflict with Flatsome which provides its own Schema Category data:
Image Box text
It is possible to check the good use of its structured data on the following Google tool: https://search.google.com/structured-data/testing-tool/
Image Box text
Exemple :
Image Box text
Also, Search Console helps you identify and correct these Product Schema issues:
Image Box text
Image Box text
These good practices allow you a better referencing, as well as a better CTR thanks to the visual rendering of your products which becomes more attractive:
Image Box text
Also, this good configuration allows you to be eligible for results on Google Shopping via product feed submission to Google Merchant Center.
Trick to fill in the “Brand” Field:
// Add Brand for Products. add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {$entity['brand'] = 'Bijoux Cailloux' ;return $entity; });
Trick to de-index paged pages from Flatsome :
With Flatsome (especially if you use the infinite scroll), it is better to disable the indexing of paginated pages (/page/2) to avoid duplicate Title & Meta:
Rank Math > Titles & Metas > Other Pages
Image Box text
Your issues are important to us, your target becomes ours and you can rely on a competent and responsive tech team. Shall we go?