How to Change the Default Astra Strings

How to Change the Default Astra Strings

Description

The astra_default_strings filter allows you to change the default strings printed by Astra.

Usage

// Filter callback function
function example_callback( $strings ) {
# ...
return $strings;
}
add_filter( 'astra_default_strings', 'example_callback', 10 );

Parameters

// 404 Page Strings
$strings['string-404-sub-title'] = __( 'This page doesn't seem to exist.', 'astra' );
$strings['string-404-search-title'] = __( 'It looks like the link pointing here was faulty. May be try searching?', 'astra' );

// Search Page Strings
$strings['string-search-nothing-found'] = __( 'Nothing Found', 'astra' );
$strings['string-search-nothing-found-message'] = __( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'astra' );
$strings['string-full-width-search-message'] = __( 'Start typing and press enter to search', 'astra' );
$strings['string-full-width-search-placeholder'] = __( 'Start Typing...', 'astra' );
$strings['string-header-cover-search-placeholder'] = __( 'Start Typing...', 'astra' );
$strings['string-search-input-placeholder'] = __( 'Search ...', 'astra' );

// Comment Template Strings
$strings['string-comment-reply-link'] = __( 'REPLY', 'astra' );
$strings['string-comment-edit-link'] = __( 'EDIT', 'astra' );
$strings['string-comment-awaiting-moderation'] = __( 'Your comment is awaiting moderation.', 'astra' );
$strings['string-comment-title-reply'] = __( 'Leave Comment', 'astra' );
$strings['string-comment-cancel-reply-link'] = __( 'Cancel Reply', 'astra' );
$strings['string-comment-label-submit'] = __( 'Post Comment →', 'astra' );
$strings['string-comment-label-message'] = __( 'Message', 'astra' );
$strings['string-comment-label-name'] = __( 'Name*', 'astra' );
$strings['string-comment-label-email'] = __( 'Email*', 'astra' );
$strings['string-comment-label-website'] = __( 'Website', 'astra' );
$strings['string-comment-closed'] = __( 'Comments are closed.', 'astra' );
$strings['string-comment-navigation-title'] = __( 'Comment navigation', 'astra' );
$strings['string-comment-navigation-next'] = __( 'Newer Comments', 'astra' );
$strings['string-comment-navigation-previous'] = __( 'Older Comments', 'astra' );
$strings['string-comment-one-comment'] = __( 'ONE COMMENT', 'astra' );
$strings['string-comment-multiple-comment'] = __( '%1$s COMMENTS', 'astra' );

// Blog Default Strings
$strings['string-blog-page-links-before'] = __( 'Pages:', 'astra' );
$strings['string-blog-meta-author-by'] = __( 'By ', 'astra' );
$strings['string-blog-meta-leave-a-comment'] = __( 'Leave a comment', 'astra' );
$strings['string-blog-meta-one-comment'] = __( '1 Comment', 'astra' );
$strings['string-blog-meta-multiple-comment'] = __( '% Comments', 'astra' );
$strings['string-blog-navigation-next'] = __('Next Page', 'astra') . ' →';
$strings['string-blog-navigation-previous'] = '← ' . __('Previous Page', 'astra');

// Single Post Default Strings
$strings['string-single-page-links-before'] = __( 'Pages:', 'astra' );
$strings['string-single-navigation-next'] = __('Next Post', 'astra') . ' →';
$strings['string-single-navigation-previous'] = '← ' . __('Previous Post', 'astra');

// Content None
$strings['string-content-nothing-found-message'] = __( 'It seems we can't find what you're looking for. Perhaps searching can help.', 'astra' );

Example

/**
* Update Search Nothing Found String and Search Input Box Placeholder Strings
*
* @param array $strings List of default strings used in theme
* @return array $strings
*/
function default_strings_callback( $strings ) {
// Search nothing found string
$strings['string-search-nothing-found-message'] = __( 'Sorry, There is no Search Result found.', 'astra' );
// Search input box placeholder
$strings['string-search-input-placeholder'] = __( 'Search ...', 'astra' );
return $strings;
}
add_filter( 'astra_default_strings', 'default_strings_callback', 10 );

Check out the doc that explains how to add custom PHP code using the child theme』s functions.php file.

Why Doesn』t Parallax Scrolling Work on Mobile?

Why Doesn』t Parallax Scrolling Work on Mobile?

Parallax scrolling is a great effect that can give your website a unique look and feel. Parallax scrolling allows your background to move slower than the foreground. This creates the illusion of depth and movement on the website for the visitors. 

If you check it on mobile devices, you』ll notice that your parallax sections don』t work but show static images instead. This document will help you understand why this is happening and how you can work around it.

Why Is This Happening?

The parallax scrolling effect is created by setting your background image position as 「fixed」 (background-attachment: fixed). This fixed image effect (parallax) is currently properly supported only by the Mozilla Firefox browser. 

When you use other browsers on any touch device, parallax scrolling will be overwritten for compatibility reasons. As a result, you will only see a static image instead of your parallax.

Due to responsiveness issues with parallax scrolling on mobile browsers and performance concerns, most mobile browsers still don』t support it. 

What Can Be Done?

Since version 3.0.0 Astra Theme comes with the Header Footer Builder. Thus, you can add a parallax scrolling effect for both the header and footer as Header Footer Builder supports it. 

Let』s show you how to activate this option, for example, for your Primary Footer:

Step 1 – Log in to your website and navigate to Dashboard > Header Builder > Primary Footer> Design > Background

Step 2 – Here, set your background image, and click on 「More Settings」

Step 3 – Under the 「Attachment」 dropdown, select the 「Fixed」 option. 「Publish」 to save changes.

Now that you have your parallax effect set on your desktop, you can add separate settings for different screen sizes since parallax scrolling doesn』t work on mobile. You can use Astra』s responsive editing options to remove parallax and design your footer (or header) for Tablet and Mobile. For this, continue with the following steps:Step 4 – Switch to Tablet/Mobile editing by clicking on the responsive editing icon on the 「Background」 option.

Step 5 – Edit your Background settings for tablet/mobile and 「Publish」

This way, you will be able to have parallax scrolling on desktop screens while having well-designed header and footer sections on tablet and mobile devices at the same time.

What About The Content?

Most often you will add content to your pages and posts by using page builders. Thus, the Astra theme parallax settings will not be applied here.

Therefore, you can use the Page builder responsive editing options in a similar way to Astra』s Header Footer Builder.

Still, in some page builders (Elementor), you will not be able to separately adjust these settings for different viewports. Here, your parallax scrolling will automatically be replaced by a static image.

How to Disable Schema Markup Added by Astra?

How to Disable Schema Markup Added by Astra?

If you weren』t already aware, Astra adds what is called 「Schema」 markup to your posts, pages, and the rest of your website. 

Adding Schema is an SEO friendly practice that helps search engines better understand your content, including the search intent.

How does Schema help? Schema tells the search engine more about what is on your page and what the page itself is about. Because search engines can better understand the search intent, this helps boost your rankings in search. 

Removing Schema Generated by Astra

There are various reasons you may want to remove the Astra generated schema markup. Perhaps you already have a Schema setup on your website that you are happy with, or maybe Schema isn』t something you want to use. Whatever reason, it』s quick and easy to remove.

Table Of Contents

Disable all Astra Generated Schema Disable Schema on a Type by Type BasisWrapping Up

Disable all Astra Generated Schema 

If you don』t want any of the Schema types on your site, add the following code to your child themes functions.php. Not sure what a child theme is? Have a look at our handy child theme guide; and build your own child theme in under 5 minutes using our child theme generator.

add_filter( 'astra_schema_enabled', '__return_false' );

Disable Schema on a Type by Type Basis

If you only want to disable certain schema types, you can do so with the useful code snippets below. 

Note:

Copy the required code from the following list and add it to the child theme』s functions.php file.

Organization Schema

add_filter( 'astra_organization_schema_enabled', '__return_false' );

Person Schema

add_filter( 'astra_person_schema_enabled', '__return_false' );

SiteNavigationElement Schema

add_filter( 'astra_site_navigation_schema_enabled', '__return_false' );

WPHeader Schema

add_filter( 'astra_wpheader_schema_enabled', '__return_false' );

WPFooter Schema

add_filter( 'astra_wpfooter_schema_enabled', '__return_false' );

WPSideBar Schema

add_filter( 'astra_wpsidebar_schema_enabled', '__return_false' );

BreadcrumbList Schema

add_filter( 'astra_breadcrumb_schema_enabled', '__return_false' );

CreativeWork Schema

add_filter( 'astra_creativework_schema_enabled', '__return_false' );

Wrapping Up

Schema type not listed here? Don』t worry! It can still be disabled; however, you』ll need to disable all Astra schema globally with the code snippet further up the article.

How To Hide Astra Settings for Specific User Roles?

How To Hide Astra Settings for Specific User Roles?

Astra Settings that you can find on each page or post of your website contain meta settings that give the user more control and the possibility of even overriding some customizer settings on each page or post. This document will show you how to hide Astra Settings for specific user roles on your website, thus limiting their access to these settings.

Why Would I Have a Need To Hide These Settings?

Meta settings are handy for additional customization of a specific page or post that needs to be different from the rest of your website. But, on the other hand, this can impact the design and even disturb the functioning of your website (for example, Disabling Primary Header on Homepage). 

If your website has a more significant number of users with different user roles, or you』re giving access to outside service providers, these users would probably require access to your content on all or some pages or posts. At the same time, they would typically have access to the meta settings too. Thus, your website might require limiting access to Astra』s Meta Settings for specific user roles while still allowing them access to pages or posts content. This might be a security measure or just the prevention of accidental issues with a website design and functions.

How To Do This?

Achieving this would require adding in a little bit of custom code to your website. Please follow these steps:Step 1 – Check your User Roles and the exact names of the User Roles you would like to limit. WordPress comes with some default user roles:

Super AdministratorAdministratorEditorAuthorContributorSubscriber

Also, some plugins could add additional User Roles to this list. You can check your Users and User Roles at Dashboard > Users.

Step 2 – Add the following filter to the functions.php file of your Child Theme:

add_action( 'do_meta_boxes', 'ast_remove_plugin_metaboxes' );

/**
* Remove Astra settings meta box for users that are not administrators
*/
function ast_remove_plugin_metaboxes(){
if ( ! current_user_can( 'administrator' ) ) {
remove_meta_box( 'astra_settings_meta_box', 'page', 'side' ); // Remove Astra Settings in Pages
remove_meta_box( 'astra_settings_meta_box', 'post', 'side' ); // Remove Astra Settings in Posts
}
}

The code mentioned above will be applied to the user roles lower than the Administrator user role – to apply this to different user roles, you can change the bolded role name 「administrator」 to any user role you wish. This will limit access to Astra』s Meta Settings for all lower roles that the one set in the code. For example, if we would want to set this limit to lower roles than Editor, this line of the code would look like this:

if ( ! current_user_can( 'editor' ) ) {

This change will now allow access to Astra』s Meta Settings to Administrators and Editors but limit it for all other (lower) roles.

Also, the code above will hide Astra Settings on both pages and posts. If you wish to, for example, leave access to these settings in Posts but hide it on Pages for a specific user role, you can do this by removing the line of code related to Posts:

remove_meta_box( 'astra_settings_meta_box', 'post', 'side' ); // Remove Astra Settings in Posts

If you don』t have your Child Theme installed, please check this article on how to do it.If you are not sure how to add this code, please check this article.

How To Override Astra』s theme.json in Child Theme?

How To Override Astra』s theme.json in Child Theme?

With WordPress 5.8 update came to the theme.json file. What does that mean? You can use this file to customize editor settings and style your Gutenberg Blocks, all from one place. The Astra theme is one of the first default themes to implement theme.json for Gutenberg Color Palette.

Also, theme.json enables template editor, but since this feature is still in development, we have disabled it until WordPress 5.9 is out. 

This document will show you how to override Astra』s theme.json file to modify your settings and styles. 

How Can I Do This?

To start with, please make sure that you downloaded and installed the Astra Child theme on your website. If you don』t have your Child Theme installed, please check this article on how to do it.

First, you will need to copy the theme.json file in the Astra theme folder and paste it inside the Astra Child theme』s main folder before you start editing the file itself. To do this, you would need an FTP client (like FileZilla, for example) installed on your computer and your website』s FTP access details.

We』ll use the FileZilla FTP client for this article, so please install it on your computer (unless you are familiar with another FTP client you would prefer to use).

Let』s start:

Step 1 – Add your FTP access data to FileZillas』 Site Manager and connect to your server;

Step 2 – You need to locate the theme.json file. Navigate to Astra theme folder (public_html > wp-content > themes > astra) Here you should find the file. Copy the file;

Step 3 – Next, navigate to the Astra Child theme』s main folder (public_html > wp-content > themes > astra-child; keep in mind that the folder name can be different if you』ve changed the name of the child theme when generating the child theme on our website). Paste the theme.json file here.

Now, you can access and modify Astra』s theme.json file copy in the Child theme, which will override the theme』s original file.

How Can I Edit Astra』s theme.json File?

Step 1 – Log in to your website Dashboard and navigate to the Appearance > Theme Editor. Choose the Astra Child in the theme selector (upper right corner);

Step 2 – Click on the theme.json file in the 「Theme files」 list;

Step 3 – Update the values and make any other changes you need to the theme.json file. Click the 「Update file」 button to apply the changes. 

Below, you can find several examples of changes made to the original theme.json code. As mentioned, you should make these changes in the code of the copy of our theme.json file, which you previously added to the Astra Child Theme.

Modify the palette colors

Your theme.json file contains the following code for defining the nine palette colors available within your Gutenberg Blocks color settings:

{
"version": 1,
"settings": {
"color": {
"palette": [
{
"name": "Theme Color 1",
"slug": "ast-global-color-0",
"color": "var(--ast-global-color-0)"
},
{
"name": "Theme Color 2",
"slug": "ast-global-color-1",
"color": "var(--ast-global-color-1)"
},
{
"name": "Theme Color 3",
"slug": "ast-global-color-2",
"color": "var(--ast-global-color-2)"
},
{
"name": "Theme Color 4",
"slug": "ast-global-color-3",
"color": "var(--ast-global-color-3)"
},
{
"name": "Theme Color 5",
"slug": "ast-global-color-4",
"color": "var(--ast-global-color-4)"
},
{
"name": "Theme Color 6",
"slug": "ast-global-color-5",
"color": "var(--ast-global-color-5)"
},
{
"name": "Theme Color 7",
"slug": "ast-global-color-6",
"color": "var(--ast-global-color-6)"
},
{
"name": "Theme Color 8",
"slug": "ast-global-color-7",
"color": "var(--ast-global-color-7)"
},
{
"name": "Theme Color 9",
"slug": "ast-global-color-8",
"color": "var(--ast-global-color-8)"
}
]
}
}
}

To change any of the colors in your Guttenberg editor, just replace the values for Name, Slug, and Color like shown in this example:

{
"name": "Lipstick",
"slug": "lipstick",
"color": "#9f1f19"
},

If you wish to have fewer colors in the Gutenberg palette, you can remove code for the colors you don』t need. Likewise, if you need more colors than these nine default ones, you can just add them using this code template:

{
"name": "COLOR NAME",
"slug": "SLUG",
"color": "HEX Color Code"
},

All color codes should be added between the brackets.

Remove the 「Custom Color」 option

Your Gutenberg editor users will still be able to get their custom colors next to the colors you added to your palette using the 「Custom Color」 option. If you want to hide this option and limit users to the palette colors, you can modify the theme.json file by adding the following code:

"custom": false

This code should be added at the end of the theme.json code, between brackets and curved brackets. Don』t forget to add 「,」 (comma) after the bracket, like this:

..."name": "Theme Color 9",
"slug": "ast-global-color-8",
"color": "var(--ast-global-color-8)"
}
],
"custom": false
}
}
}

Update the color palette for the Paragraph Block

You can also add color limitations only for specific Blocks to Astra』s theme.json file. This is an example of how you can limit the Paragraph Block only to show the first three colors in the editor:

"blocks": {
"core/paragraph": {
"color": {
"custom": true,
"palette": [
{
"name": "Lipstick",
"slug": "lipstick",
"color": "#9f1f19"
},
{
"name": "Theme Color 2",
"slug": "ast-global-color-1",
"color": "var(--ast-global-color-1)"
},
{
"name": "Theme Color 3",
"slug": "ast-global-color-2",
"color": "var(--ast-global-color-2)"
}
]
}
}
}

This code should be added the same as the previous one – at the end of the theme.json code, between brackets and curved brackets, with 「,」 (comma) after the bracket.

Note:

The theme.json file allows you to make quite a number of additional modifications: Please check this link for more details.

How to Remove Inline CSS from Astra?

How to Remove Inline CSS from Astra?

The following filter will remove inline CSS generated by the Astra theme and Astra Pro plugin. Paste the following code into child theme』s functions.php file

IMPORTANT NOTE: This filter will remove all the inline CSS added by Astra which will affect the styling of your website.

function astra_force_remove_style() {
add_filter( 'print_styles_array', function($styles) {

// Set styles to remove.
$styles_to_remove = array('astra-theme-css', 'astra-addon-css');
if(is_array($styles) AND count($styles) > 0){
foreach($styles AS $key => $code){
if(in_array($code, $styles_to_remove)){
unset($styles[$key]);
}
}
}
return $styles;
});
}
add_action('wp_enqueue_scripts', 'astra_force_remove_style', 99);

How to Fix 5XX Error While Importing a Starter Template?

How to Fix 5XX Error While Importing a Starter Template?

Did you try to import templates for your website using the Starter Templates plugin, and your import failed?

Do you see a 5XX error like for example:

Error: 500 Allowed memory size of XXXXXXXX bytes exhausted (tried to allocate XXXXX bytes)

This error can be seen on the Starter Template 「import process interrupted」 notification popup or in the debug.log file.

This can happen if any of the following is true:

There is an issue with plugins on the site (Plugin conflicts / PHP error)There is an issue with the hosting (Resources such as old PHP version / exhausted resources)

Let』s take a look at how this can be fixed:

Step One: Avoid Conflicts

Deactivate all plugins except Starter Templates to get rid of any possible issues with other plugins. And try importing the template again.

Did it work? Awesome!

If not, let』s continue to the next step:

Step Two: Check WP Debug Log

Enable WordPress debugging mode by installing the WP Debugging plugin and try importing a starter template. This plugin will provide log files to get an idea of what might be causing the issue.

Still no luck? Let』s move on.

Step Three: Update PHP Version

WordPress works with PHP versions as old as PHP 5.6. However, all PHP versions before PHP 7.3 are end-of-life (EOL), meaning they no longer receive updates. Because of this, your site may be exposed to security vulnerabilities.

Moreover, old PHP versions slow down the website and cause other issues.

This article will help you understand how to check the PHP version of your website. We recommend getting on the latest possible PHP version, or at least 7.3.

Step Four: Increase Resources Set by Host

In many cases, Starter Templates import can fail because of the limits set by server PHP configuration.

Your website needs a certain amount of resources to function properly. Depending on the activities on your website and all the plugins running, there may be just not enough resources left for the successful template import. In this case, we would suggest modifying your PHP configuration to the following recommended values (values are approximate):

memory_limit = 512M
max_execution_time = 900
max_input_time = 900
post_max_size = 256M
upload_max_filesize = 720M

These settings will ensure that there are enough resources on your website, even if you』re, for example, running some highly demanding plugins. These are not, in any case, the minimum required values, as the Starter Templates plugin needs minimal resources. Thus, you can also try increasing your values gradually and checking if you can import your template successfully with those settings.

For many non-techie users, this might feel daunting, and checking the log files process will differ from host to host. So it is always better to get it done by someone who knows it well.

So feel free to get in touch with your hosting company, and they will be happy to do it for you.

Here is an email that you can send:

Host Email Template:

Hello,I』m trying to import a starter template from the plugin: https://wordpress.org/plugins/astra-sites/. And it appears that my website is getting a 500 – Internal Server Error. Is it possible for you to:1) Enable WordPress debugging mode2) Check the log files3) Share the file with me?Also the plugin documentation mentioned recommended PHP configuration to be used. Could you please apply the following values for my website:PHP Version: 7.3 or latest possiblememory_limit = 512Mmax_execution_time = 900max_input_time = 900post_max_size = 256Mupload_max_filesize = 720MCan you help me with this?

Still no luck? Please feel free to get in touch with our support, and we will be happy to take a look. But before that.. one question for you:

Is Your Website With Good Host?

We have mostly seen this happen on low-end hosting. Such hosting servers are shared by many different websites, and hence individual users don』t get enough resources that their website needs to perform properly.

The above PHP configuration helps in many cases, but it does not guarantee your website will get those resources. If a server does not have any resources left, your website won』t have them available for the Starter Template import, no matter how we configure it.

We always recommend opting for decent hosting as it is a crucial part of running a healthy website. If you are looking for recommendations, we have a few. They all come with a trial period / money-back guarantee.

Astra Global Color Palette

Astra Global Color Palette

Global Color Palette is a feature that allows you to set one or more color palettes. This way you can control colors across your entire website from one place. Also, you can change the colors for your entire website by simply switching to another color palette.

The Global Color Palette feature is available with the Astra theme since version 3.7.0. You can find these settings under Appearance > Customize > Global > Colors.

Setting Palettes

There are three palettes available, each of them containing nine colors in total. These colors are connected throughout the palettes. This means, that when you switch between the palettes, colors will be replaced with their matching colors in the currently activated palettes.

For example, let』s say that the 「Color 1」 is set blue in Palette 1, and set to green in Palette 2. Switching from Palette 1 to Palette 2 will change all settings linked to 「Color 1」 from blue to green.

Let』s start by editing palettes, following these steps:

Step 1 – Click on one of the three available palettes to start editing. This will show you available color slots;

Step 2 – You can set each of these colors by clicking on the color slot. This will open a color picker.

Step 3 – Choose the color you want to apply to this slot;

Step 4 – In the same way, you can set all other colors;

Step 5 – Click the 「Publish」 button to save changes.

You can repeat these steps for each of the three color palettes.

Also, the Astra Theme is one of the first default themes to implement theme.json for Gutenberg Color Palette, so the palette colors can be edited this way too.

Notice Title

Though theme.json enables template editor, since the feature is still in development, we have disabled it until WordPress 5.9 is out.

Linking Global Colors

Each palette color can be used for any of the color settings on your website. You just need to link the global palette color to your settings and you』re done.

Let』s show you how to link the global colors. For this example, we』ll be linking the button colors:

Step 1 – Let』s say we have a button in the header. To link its background color with global color, just edit the setting and from the global color palette select the color you want. Clicking on any color from the palette will link it to the current color.

Step 2- Now if you navigate to navigate Appearance > Customize > Global > Colors and try to change the color that you linked in the above step, you will observe the linked color will change automatically.

Step 3 – Click the 「Publish」 button to save changes.

Though you set your Global Color Palettes, you can still use your static colors, as you did previously, for any color settings in your customizer.

Keep in mind that changing any color settings to some other static color will disconnect the palette colors for these settings. This means that the palette colors will not be automatically applied to these settings anymore.

To use palette colors for these options again, you need to link them again.

Switching Between Palettes

Now that you have all the color settings linked to Global colors, you can switch between your three palettes to completely change the way your website looks.

You only need to activate another Global Color Palette and all colors will be replaced on your entire website with the matching color set for this palette:

Let』s say that we set the 「Color 1」 in our 「Palette 1」 to orange color. In our 「Palette 2」 the 「Color 1」 is set to purple color. This means, that when our Palette 1 is active, all website elements linked to the 「Color 1」 are orange. Switching to 「Palette 2」 will automatically change all of these elements to purple color.

Let』s show you how we did this in our example:

Step 1 – Navigate to the Global Palette option (Appearance > Customize > Global > Colors);

Step 2 – Click on 「Palette 1」 to activate and set the 「Color 1」 to the orange color;

Step 3 – Click on 「Palette 2」 and set the 「Color 7」 to the purple color;

Step 4 – Navigate to Appearance > Customize > Global > Buttons

Step 5 – Here, click on the 「Border Color」 and link it to the 「Color 1」. This will make the button border white orange when Palette 1 is active, and purple when you switch to Palette 2.

Step 6 – Click the 「Publish」 button to save changes.

This way, you can easily switch all of your website colors with just one click. For example, this way you could use your standard website color palette most of the time, and switch to the remaining two palettes for special occasions. Thus, you could make adjustments to your whole website for the New Year holidays, St. Valentine』s day, Winter or Summer season, etc. in just one click.

Global Color Palette for Your Content

Global Color Palette is compatible with both Gutenberg and Elementor.

Your active palette colors will be available with your page builder color options out of the box – just set your palette colors and use them for your content too. Check it out:

Gutenberg Blocks:

Elementor Widgets:

Same as with Customizer options, these colors will adjust to your palette selection. Thus, when you change your color palette, your content colors will change accordingly.

Disable Astra』s Native AMP Functionality

Disable Astra』s Native AMP Functionality

If you want to disable Astra』s integration for AMP, use custom code snippet mentioned below.

Add mentioned filter into child theme』s functions.php file.

// Disable Astra Theme's Native AMP support.
add_filter( 'astra_amp_support', '__return_false' );

Read more about Astra』s AMP integration and other related docs –

Native AMP Support in AstraConfigure AMP Plugin

How to Fix Operation Timed Error While Importing a Starter Template?

How to Fix Operation Timed Error While Importing a Starter Template?

When you import a template, the data are being transferred to your server. If you see the error description like the one shown below, the error is caused by a server not being able to respond to a connection request in a timely manner:

Error: 500 Maximum execution time of XXX seconds exceeded

The connection request flow looks like this:

That means that the whole flow you see in the image above needs to be completed within the set time frame (30 seconds in this case). If the above connection request flow does not complete in the allowed time frame, it will cause the connection request to timeout and the import process to fail.

How To Fix This?

Please follow these steps and try importing again with each step. Let』s start:

Simply try importing the template again. Something temporary could have caused the delay. Chances are, it works in the next attempt.No luck with the previous step? Try again but using a different browser. There might be something in your browser (maybe an extension) blocking the request and causing a time-out.Next, if you』re using VPN, please try turning it off.If that didn』t help, please temporarily deactivate a security plugin on your website if you』re using it (Ex – Wordfence, iThemes Security, etc.)If all previous steps didn』t solve it, deactivate all of your plugins except Starter Templates and give it another try (some other plugin on your website may be causing conflict)

Still Having Issues?

Contact your hosting provider and ask them to help, as your host might be causing the conflict. You could use the following template to contact your hosting provider:

Host Email Template:

Hello,I』m building a WordPress website using the Astra theme. I』m trying to import a template using the 「Starter Templates」 plugin (https://wordpress.org/plugins/astra-sites/), but the process keeps failing. Here is the error notice I am receiving – 『WP_Error – cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes receivedWould you please take a look? I』m looking forward to hearing from you.Thank you!Regards,Your name

Still Not Fixed – Let Us Know? 

Open a support ticket with us here, and we will be happy to take a look. If you』re our Premium user, you can expect a reply from our Support team in a maximum of 24 hours. If you』re a free user, don』t worry our Support team will help you out, but it might take a few days as we prioritize tickets.

We will need the FTP details of your server, so please include these in your support request.