LifterLMS Shortcode to Add Profile Link

LifterLMS Shortcode to Add Profile Link

This is a premium feature available with Astra Pro Addon plugin. To use these Pro features, you need to have the Astra theme along with the Astra Pro Addon installed on your website.

Also, make sure that you have the LifterLMS plugin installed and activated.

Astra Pro plugin provides a shortcode for LifterLMS that allows displaying a profile link. The shortcode can be used anywhere on the website. It will display a profile picture for logged-in students. Clicking on it will display student profile details.

The LifterLMS addon in the Astra Pro provides a shortcode [astra_lifterlms_profile_link] This can be used on various locations like header, footer, sidebar, widgets, page builders, etc.

To use the shortcode, activate the LifterLMS addon from Astra Options. (screenshot)

Below is the example that shows how can this shortcode be used –

How to Display Lifterlms Profile Link in the Primary Header?

Below are the detailed steps –

Step 1 – Make sure to activate LifterLMS and Astra Pro plugin. Activate LifterLMS addon from Astra Options. (screenshot)

Step 2 – From the WordPress dashboard navigate to Appearance > Customize > Header >  Primary Menu.

Step 3 – From the Last Item in Menu drop-down, select Text / HTML.

Step 4 – Paste the code in the input area. Profile link will appear in the header as shown below –

Disable featured image on all pages

Disable featured image on all pages

Astra has a filter astra_featured_image_enabled which can be used to programmatically enable or disable the featured image.

Here is an example snippet that shows how you can disable the featured image on all the pages by default.

/**
* Disable featured images for pages.
* Set the featured image to false if current post type is 'page'
*
* @param boolean $status True - Enable featured image; False - Disable featured image
* @return boolean Featured image status based on the
*/
function disable_feattured_image_for_posts( $status ) {

// disable featured image for pages.
if ( 'page' == get_post_type() ) {
$status = false;
}

return $status;
}

add_filter( 'astra_featured_image_enabled', 'disable_feattured_image_for_posts' );

Note:

Add the above code into the child theme』s functions.php file.

How to Duplicate 『Custom Layouts』 and 『Page Headers』?

How to Duplicate 『Custom Layouts』 and 『Page Headers』?

Astra Pro Addon plugin provides Custom Layouts and Page Header addon. You can create custom designs with these addons.

Sometimes you might need to duplicate them, tweak a little and use again on the same or different sites. Below are some suggestions on how to proceed –

Duplicate Custom Layouts and Page Headers

You can use the external plugin for this. A plugin like Duplicate Page and Post allows duplicating Astra』s  Custom Layouts and Page Headers. Just install the plugin, it will offer the option for each post.

Import / Export Custom Layouts and Page Headers

You can export Custom Layouts and Page Headers from WordPress backend under Tools > Export. Then Import it on another website from Tools > Import > WordPress ( Install > Run Importer ).

LearnDash Shortcode to Add Profile Link

LearnDash Shortcode to Add Profile Link

This is a premium feature available with Astra Pro Addon plugin. To use these Pro features, you need to have the Astra theme along with the Astra Pro Addon installed on your website.

You can achieve displaying a Profile Link using a LearnDash shortcode using LearnDash module available with Astra Pro. Please refer document, to begin with, LearnDash module.

Astra Pro Addon plugin provides a shortcode for LearnDash that allows displaying profile link. The shortcode can be used anywhere on the website. It will display a profile picture for logged-in students. Clicking on it will display student profile details.

The LearnDash addon in the Astra Pro Addon plugin provides a shortcode [astra_learndash_profile_link] This can be used on various locations like header, footer, sidebar, widgets, page builders, etc.

To use the shortcode, activate the LearnDash addon from Astra Options. (screenshot)

[astra_learndash_profile_link] has an attribute 『link』 that will open on click of the profile picture.

For Example – [astra_learndash_profile_link link="https://www.google.com"] This shortcode will display a profile picture for the logged-in student. On click, it will be redirected to inserted link i.e. to https://www.google.com

Below is the example that shows how can this shortcode be used –

How to Display Learndash Profile Link in the Primary Header?

Below are the detailed steps –

Step 1 – Make sure to activate the LearnDash and Astra Pro plugin. Activate LearnDash Addon from Astra Options. (screenshot)

Step 2 – From the WordPress dashboard navigate to Appearance > Customize >  Header > Primary Menu.

Step 3 – From the Last Item in Menu drop-down, select Text / HTML.

Step 4 – Paste the code in the input area. Profile link will appear in the header as shown below –

Sidebar / Container Options in Customizer for Learndash Not Working?

Sidebar / Container Options in Customizer for Learndash Not Working?

Some options in the customizer (Sidebar, Container, Distraction Free Learning) work seamlessly on the pages that are created from LearnDash Custom Post Type.

Below are the examples of LearnDash Custom Post Type Pages:

Single course pagesLessonsTopicsQuizzes

However, if you have created any layouts with the help of LearnDash shortcodes, the options in customizer mentioned above will NOT work. Instead, you can set the sidebar and container for those pages from the meta options.The LearnDash Layout options can be found at Appearance > Customize >  Global > Container:

Display SubMenu Just Below the Header

Display SubMenu Just Below the Header

If you have observed, whenever you hover the parent menu, the submenu opens just below the parent menu. No matter what your header height is. In this case, submenu cuts the header and display over it just below the parent menu.

In the Astra Theme version 1.5.0 and above we are introducing a filter that will open a submenu below the header without cropping it. You can enable this functionality by adding the following filter to the child theme』s function.php file.

add_action( 'wp', 'astra_open_submenu_below_header' );
function astra_open_submenu_below_header() {
if ( false === astra_get_option( 'submenu-below-header', true ) ) {
add_filter( 'astra_submenu_below_header_fix', '__return_true' );
}
add_filter( 'astra_submenu_open_below_header_fix', '__return_true' );
}

This filter introduces padding difference of ~5px in the header.

How this will work for existing sites –

For the existing sites, those will update to this version (1.5.0) the above change will be disabled by default. You can enable this by adding the above filter.

How this will work for new installations –

If you freshly installed Astra Theme with version 1.5.0 and above the above functionality will be enabled by default. You don』t need to add any snippet.

The functionality of the filter is shown below:

Before adding a filter:

After adding a filter:

How to Add Google Tag Manager Code to Astra?

How to Add Google Tag Manager Code to Astra?

Custom Layouts module available with Astra Pro Addon plugin allows adding Google Tag Manager code to the website. It provides hooks so that you can insert custom code at various locations on the website without editing theme』s core files.

This is a premium feature available with Astra Pro Addon plugin. To use these Pro features, you need to have the Astra theme along with the Astra Pro Addon installed on your website.

Google Tag Manager code has two code snippets. One to be added as close to the opening tag as possible and other immediately after the opening tag. To add both code snippets, add two different Custom Layouts. Below are the steps to create Custom Layout and add code using hooks.

1. Custom Layout to add code to  tag – 

Activate the Custom Layouts module from Astra Pro.Add a new Custom Layout. Insert the code in the Code Editor.Select Hooks layout and add wp_head action.Choose to display it on Entire Website.Publish the layout.

2. Custom Layout to add code to  tag – 

Add a new Custom Layout. Insert the code in the Code Editor.Select Hooks layout and add body_top action.Choose to display it on Entire Website.Publish the layout.

Default Structured Data and Schema Markup in Astra Theme

Default Structured Data and Schema Markup in Astra Theme

Schema is basically a joint effort by all major search engines that guidelines the markup that we should add in our website. This markup allows search engines to better understand our website and display better search results.

As you might already know, Astra theme adds Schema markup to and takes care of the SEO fundamentals of your website. Below is the list of all Schemas Astra adds on your website:

WebPage: On WordPress single pages

Blog: On Blog Index Page

Person:

On author archive pages.On blog posts meta to the author link.Author Bio on blog posts

WPHeader: To the header

WPFooter: To the footer

WPSideBar: To the main sidebar

SiteNavigationElement: To the primary navigation menu.

SearchResultsPage: On Search Results Pages

Organization: To the title & logo

BreadcrumbList: To the breadcrumb through Page Header module in Astra Pro

Adding Custom Sidebar to the Theme with Lightweight Sidebar Manager plugin

Adding Custom Sidebar to the Theme with Lightweight Sidebar Manager plugin

Sometimes it is required to display a suitable, separate sidebar on certain pages on the website. Apart from the default sidebar provided by the theme, you can create a custom sidebar and display it on particular pages with display rules.

To add custom sidebar you need to use Lightweight Sidebar Manager plugin, which is free and available on WordPress repository.

This plugin will replace the theme』s default sidebar with the custom sidebar. It also allows replacing widget areas in header or footer. If you have plugins that provide their own widget area like WooCommerce, this plugin allows replacing those widget areas as well.

Below are the steps to use Lightweight Sidebar Manager plugin –

1. Install and activate the plugin on a WordPress site.2. Settings can be found under Appearance > Sidebars.3. Add New sidebar and enter a title for your custom sidebar.4. Fill sidebar settings.

Sidebar To Replace: Select the sidebar or widget you wish to replace. All available sidebar and widget areas in the theme will be listed here.Description: Add description for your custom sidebar. This is optional.Display On: Choose whether to display the custom sidebar on the entire website or on specific pages/posts. You can even exclude a particular page/post by adding them to the Exclusion Rule.User Roles: You can decide a user role for which custom sidebar should be visible. For excluded users, the default sidebar set with the theme will be visible.

5. Above steps will register the custom sidebar on site. This custom sidebar will appear under Appearance > Widgets.6. Add widgets to this custom sidebar. Drag and drop the widgets you want to add to the custom sidebar.

7. That』s it! Your custom sidebar will appear on pages/post/widget areas you selected with display rules.

Check following things if you are not able to see custom sidebar –

1. Default sidebar is enabled from the theme. As custom sidebar replaces default sidebar, it needs to be enabled from the theme.2. If you have selected the sidebar to display on the header/ footer, check if the widget area is enabled for header/footer. Custom sidebar replaces the widget area in the header/footer so you need to enable it.

Using Lightweight Sidebar Manager plugin with Astra theme

Below is the example that shows how to add a custom sidebar to Astra primary header –

1. Install and activate the Astra theme and Lightweight Sidebar Manager plugin.2. As we need to set a custom sidebar in the primary header, we need to add the widget area in the header. To add widget area navigate to Appearance > Customize > Header > Primary Menu > Last Item in Menu and select Widget from the list.

3. Now follow the steps that are mentioned above to use Lightweight Sidebar Manager plugin.4. This will add a custom sidebar to Astra Header. For the demo, we have added image gallery widget to the custom sidebar as shown in the screenshot below –5. Similarly, you can add a sidebar to the footer and other sections of Astra header.

How to Download Older Version of Astra Theme or Astra Pro Addon plugin?

How to Download Older Version of Astra Theme or Astra Pro Addon plugin?

Astra is a free WordPress theme. The development for the theme is going on with GitHub on the link here. Sometimes you may need an older version of the theme. previous version zip for Astra theme can be downloaded from WordPress repository.

Below is the URL that allows direct downloading zip for required version –

https://downloads.wordpress.org/theme/astra.required_version.zip

Note: In place of required_version enter version number of the theme.

For Example –

If you wish to download zip for theme version 1.0.2 then URL will be –

https://downloads.wordpress.org/theme/astra.1.0.2.zip

You can find the changelog for a theme here.

In case you need the previous version for Astra Pro Addon, write to Astra Support on the link here.