Display Products from Same Category with Navigation

Display Products from Same Category with Navigation

Astra Pro Addon plugin』s WooCommerce addon allows displaying navigation on the single product page. Refer a document here to see the option in detail. Enabling this option will add previous and next button link on the WooCommerce single product page. 

By default, when you click on the next button, a product will be displayed on the basis of published date. If you want to show next and previous products from the same category only then use filter provided below. This filter will display next/previous product from the same category based on the product published date.  

For example – If category A has 10 products, then starting from 1st product next link will display all 10 products. After 10 products the next link will be disabled.

Paste following filter in child theme』s functions.php file. 

function astra_woo_product_previous_post_nav( $args ) {

$args = array(
'format' => '%link',
'link' => '',
'in_same_term' => true,
'excluded_terms' => '',
'taxonomy' => 'product_cat',
);
return $args;
}
add_filter( 'astra_woo_product_previous_post_nav_args', 'astra_woo_product_previous_post_nav' );

function astra_woo_product_next_post_nav( $args ) {

$args = array(
'format' => '%link',
'link' => '',
'in_same_term' => true,
'excluded_terms' => '',
'taxonomy' => 'product_cat',
);
return $args;
}
add_filter( 'astra_woo_product_next_post_nav_args', 'astra_woo_product_next_post_nav' );

From the above filter link argument can be updated as follows –

link: If you want to update next and previous link icons for navigation, update this argument. You can use  tag from various font libraries. You would then need to upload respective font library to Astra. Here is the article that shows how Font Awesome Icons can be used with Astra.

Plugin Installation Failed – Multisite

Plugin Installation Failed – Multisite

Starter Templates are built with the free version of page builders and some other plugins. While importing a template, if these required plugins are not available on your website, they will be automatically installed.

In case, the automatic plugin installation process fails, you will see a popup showing an error – 「Plugin Installation Failed「

If you are on a single site, refer this document here.

In case you are on multisite, here is what you can do –

If your user profile has access to install plugins, Starter Templates plugins will automatically do work for you.

But in case your use profile does not access, you would need to contact your website administrator and ask them to install required plugin for your starter templates.

How to Change the Heading Tag for the Related Posts Title?

How to Change the Heading Tag for the Related Posts Title?

If you have enabled related posts on your Blog posts, you might have noticed that the Related Posts Title has the

heading tag assigned by default.

You can modify this tag to any other HTML tag by adding a filter to the functions.php file of your Astra Child Theme. If you don』t have a Child Theme installed and activated on your website, please check this article on how to do this. 

How Can I Do This?

You can use the filter below to change the tag for the Related Posts Title to any other tag. Please follow these steps:

Step 1 – Navigate to Dashboard > Appearance > Theme Editor and select the Child Theme;

Step 2 – Add the filter below to the functions.php file of your Child Theme. You can check this article on adding code to your Child Theme to help you out;

// Filter for changing related posts title heading tag.
add_filter( 'astra_related_posts_title', 'update_related_posts_title_markup', 10, 1 );
function update_related_posts_title_markup( $markup ) {
$markup = '

';
return $markup;
}

Step 3 – The filter will change the default

tag to

tag. Update this by replacing

in the code with any heading tag needed. Click the 「Update File」 button to apply changes.

Note:

Please keep in mind that you need to replace the h4 tag with your needed tag in both places within the code to make this work – one is the opening tag, and the other one is the closing tag (just like we have used

in both places in the code above).

Default Tag

Heading Tag after adding the Filter

Fix Woocommerce Cart Becoming Transparent With Header Builder

Fix Woocommerce Cart Becoming Transparent With Header Builder

If you decided to switch from the old Astra header to a new Header Footer Builder, you might have noticed that your WooCommerce mini cart became transparent. 

Astra Theme version 3.6.7 came with the fix for this, but the fix is not applied automatically to existing websites. Learn how to apply it to your website.

Why Do I Need This Improvement?

The WooCommerce cart added to your old Astra header had the background set to white color by default. 

Switching to Astra』s Header Footer Builder caused the cart to become transparent.

Though Astra 3.6.7 update comes with the fix, this won』t be applied automatically to your website to avoid unwanted effects on your existing websites.

How To Fix This?

For all new websites, this fix will be applied automatically when the theme is updated. 

As mentioned, for the existing website, this fix needs to be activated by adding a filter. This was done to allow you to check how these changes apply to your website and make any changes if needed. 

To apply the improvement to your existing website, you would need to add a filter to the functions.php file of your Child Theme. If you don』t have your Child Theme installed, please check this article on how to do it. Please add the following filter:

add_filter( 'astra_apply_background_to_outline_cart_builder_element', '__return_true' );

If you are not sure how to add this code, please check this article.

Remove Spacing Around Elementor Pro TOC Widget

Remove Spacing Around Elementor Pro TOC Widget

When building your website with Astra Theme and Elementor Pro you might have noticed a larger spacing around the 「Table Of Contents」 (TOC) widget than needed. 

Astra Theme version 3.6.7 came with the fix for this, but the fix is not applied automatically to existing websites. Learn how to apply it to your website.

Why Do I Need This Improvement?

The additional spacing was created as a result of the Astra theme』s CSS for the default 「ul」 tag. The tag was affecting Elementor Pro』s TOC widget. 

You can check the following example:

This is the Elementor Pro TOC widget with Hello Elementor theme:

And here, you can see how the same widget look when used with the Astra Theme:

Though Astra 3.6.7 update fixes this issue, it won』t be applied automatically to your website to avoid unwanted effects on your existing websites.

How To Fix This?

For all new websites, this fix will be applied automatically when the theme is updated. 

As mentioned, for the existing website, this improvement needs to be activated by adding a filter. This was done to allow you to check how these changes apply to your website and make any changes if needed. 

To apply the improvement to your existing website, you would need to add a filter to the functions.php file of your Child Theme. If you don』t have your Child Theme installed, please check this article on how to do it. Please add the following filter:

add_filter( 'astra_remove_elementor_toc_margin', '__return_true' );

If you are not sure how to add this code, please check this article.

Fix Swap Sections Not Working on Mobile (Old Astra Header)

Fix Swap Sections Not Working on Mobile (Old Astra Header)

Astra』s old header provides some additional options for mobile header editing with Astra Pro, one of them being Swap Sections. If it happens that this option is not working on your website, this document will help you fix it.

Astra Pro Addon version 3.5.7 corrects this, but the fix is not applied automatically to existing websites. Learn how to apply it to your website.

Why Do I Need This Improvement?

The Swap Section feature is available for the Above and Below headers with a two-section layout. The feature allows the headers sections to swap places on mobile viewport if needed.  

If you have this option activated, you might have noticed that the feature is not giving the desired result. If this is the case, the Astra Pro version 3.5.7 comes with the solution for this.

Though Astra Pro 3.5.7 update fixes this issue, it won』t be applied automatically to your website to avoid unwanted effects on your existing websites.

How To Fix This?

For all new websites, this fix will be applied automatically when you update the plugin (Astra Pro). 

As mentioned, for the existing website, this improvement needs to be activated by adding a filter after updating the plugin. This was done to allow you to check how these changes apply to your website and make any changes if needed. 

To apply the improvement to your existing website, you would need to add a filter to the functions.php file of your Child Theme. If you don』t have your Child Theme installed, please check this article on how to do it. Please add the following filter:

add_filter( 'astra_apply_swap_mobile_header_sections_css', '__return_true' );

If you are not sure how to add this code, please check this article.

How To Fix Right Margin for the Footer Widget Element

How To Fix Right Margin for the Footer Widget Element

Astra Theme version 3.6.7 brought a fix for the Footer Widget Element right margin. 

The update came with the fix for this, but the fix is not applied automatically to existing websites. Learn how to apply it to your website.

Why Do I Need This Improvement?

Previously the right margin wasn』t applying on the front end for the Footer Widget elements in your Footer Builder. 

Though Astra 3.6.7 update comes with the fix, this won』t be applied automatically to your website to avoid unwanted effects on your existing websites.

How To Fix This?

For all new websites, this fix will be applied automatically when the theme is updated. 

As mentioned, for the existing website, this improvement needs to be activated by adding a filter. This was done to allow you to check how these changes apply to your website and make any changes if needed. 

To apply the improvement to your existing website, you would need to add a filter to the functions.php file of your Child Theme. If you don』t have your Child Theme installed, please check this article on how to do it. Please add the following filter:

add_filter( 'astra_apply_right_margin_footer_widget_css', '__return_true' );

If you are not sure how to add this code, please check this article.

How To Fix Not Being Able To Edit Submenu Colors, Above and Below Header?

How To Fix Not Being Able To Edit Submenu Colors, Above and Below Header?

Did you experience not being able to edit Submenu Colors with Header Footer Builder, or Above and Below headers you added using the Page Header module?

Astra Pro Addon version 3.5.7 corrects this, but the fix is not applied automatically to existing websites. Learn how to solve this. 

Why Do I Need This Improvement?

Before the Astra theme』s version 3.0 and Header Footer Builder that came with it, the 「Header Section」 module as part of the Astra Pro was providing some advanced options for the old Astra Header (like Swapping section positions on mobile, some typo options, or color options, etc.). 

The reason for this is that the Header Footer Builder was still dependant on the 「Header Section」 module for the users who switched from the old header versions. Thus, when this module was not activated in Astra Options the mentioned issues were appearing.

Though Astra Pro 3.5.7 update removed this dependency completely, this change won』t be applied automatically to your website to avoid unwanted effects on your existing websites.

How To Fix This?

For all new websites, this fix will be applied automatically when you update the plugin (Astra Pro). 

For the existing website, this improvement needs to be activated by adding a filter after updating the plugin. This was done to allow you to check how these changes apply to your website and make any changes if needed. 

To apply the improvement to your existing website, you would need to add a filter to the functions.php file of your Child Theme. If you don』t have your Child Theme installed, please check this article on how to do it. Please add the following filter:

add_filter( 'astra_remove_header_sections_dependency', '__return_true' );

If you are not sure how to add this code, please check this article.

Usage Tracking

Usage Tracking

We are committed to making our products better every day and it isn』t possible without the help of our users like you. 

By allowing to collect non-personal information about your website and server configuration, you can help us understand different possibilities and test our products better. 

We thank you in advance for enabling this option

What Exactly Do We Track? 

We will anonymously track the following parameters – 

List of active pluginsActive themeProducts by Brainstorm ForceThe version of Curl SSLVersion of CurlURL of the WebsiteIf site is using external object cache?Is GD extension available?BSF Updater VersionIs Imagik Extension availableIf a website is WordPress Multisite installationWhether SSL certificate is installedIf the wp-content directory is writable?The MYSQL versionThe PHP ini setting – php_max_execution_timeThe PHP ini setting – php_max_input_varsThe PHP ini setting – php_memory_limitThe PHP ini setting – php_osThe PHP ini setting – php_post_max_sizeThe php_versionThe server softwareWordPress LanguageTimezone set in WordPressWhether wp_debug is enabledWhether wp_debug_display is enabledThe version of WordPress installedIf the xmlreader existsIf zip_installed is enabledIs script_debug enabled?

By collecting this non-personal information, we develop better, more compatible software and serve our customers better.

How to Enable/Disable Usage Tracking? 

You will see an admin notice that will allow you to enable usage tracking.

You can manually allow tracking anytime from Settings > General > Usage Tracking. Tick the checkbox and save the changes. In case you wish to disable it, you can hit the same checkbox.

How to Install Astra Theme?

How to Install Astra Theme?

Astra is a free WordPress theme. Therefore, it can be installed and used like any other.

To install it on your site kindly follow the steps-

Login to your WordPress Dashboard.Go to Appearance > Themes > Add NewSearch for – AstraInstall AstraActivate it

Note: If you need the zip file of Astra theme, you can download it from the WordPress Repository here.

Looking for help to install the Astra Pro (Addon) Plugin? Read the article here.