I have a website and I’m using Elementor to build my pages. I’d like to use elemento to add Feedaty block in my specific page. Is it compatible? I can add it using standard widget position but In elementor I can’t found feedaty widget.
]]>Hi,
we use the Rank Math Rich Snippet and the aggregate rating is not displayed. I researched why and i found that there is a filter to append your aggregate rating to rank math rich snippet.
I added the filter in my child theme, but i think should be better you add this snippet to the plugin.
add_filter('rank_math/snippet/rich_snippet_product_entity', function ($entity) {
if (!is_plugin_active('feedaty-rating-for-woocommerce/feedaty-rating-for-woocommerce.php')) {
return $entity;
}
$plugin_public = new Feedaty_Woocommerce_Rating_Public('feedaty-rating-for-woocommerce', FEEDATY_WOOCOMMERCE_RATING_VERSION);
$markup = $plugin_public->append_microdata([]);
$entity['aggregateRating'] = ['ratingValue' => $markup['aggregateRating']['ratingValue'], 'reviewCount' => $markup['aggregateRating']['reviewCount']];
return $entity;
});
I hope you accept this suggestion.
]]>So I am investigating in all the optimization tasks we can do for a customer.
I see in backend that in any backend page the settings for feedaty are loaded:
// Create filter for listing hooks inside product page, this list can be expanded in funkctions.php
add_filter( $this->plugin_name . '_product_badge_hooks', array ( $this, 'product_badge_hooks' ) );
// Create filter for importing legacy settings
add_filter( "{$this->plugin_name}_heritage", array ( $this, 'heritage' ) );
// Retrieve plugin options and apply legacy settings
$this->options = apply_filters( "{$this->plugin_name}_heritage", get_option( $this->plugin_name ) );
in class-feedaty-rating-for-woocommerce-admin.php
There is this code that is executed in every page but this should be executed only in the Product list.
A check with a code like this:
if( isset($_GET['post_type']) && $_GET['post_type']==='product' ) {
It is enough as that those filter are needed in the product post type not in articles as example…