This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @return remove woocommerce support for zooming effect | |
*/ | |
add_action( 'after_setup_theme', 'astra_child_remove_woocommerce_support', 20 ); | |
function astra_child_remove_woocommerce_support() { | |
remove_theme_support( 'wc-product-gallery-zoom' ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add Custom Text with Logo. | |
add_filter( 'get_custom_logo', 'add_title_markup_with_logo' ); | |
function add_title_markup_with_logo( $output ){ | |
$output .= '<div class="logo-hover-overlay">'; | |
$output .= '<div class="site-title-custom-text">Your Custom Text</div>'; | |
$output .= '</div>'; | |
return $output; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register a new image size. | |
* | |
* @link https://developer.wordpress.org/reference/functions/add_image_size/ | |
* | |
* your-custom-size -- Image size identifier | |
* 940 -- width of the image size as per your requirement. | |
* 540 -- width of the image size as per your requirement. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disable title on all pages and posts. | |
*/ | |
function your_prefix_post_title() { | |
$post_types = array( 'page', 'post' ); | |
// bail early if the current post type if not the one we want to customize. | |
if ( ! in_array( get_post_type(), $post_types ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Default Blog / Archive and Single Blog Post sidebar applied to the Custom Post Type */ | |
add_filter( 'astra_page_layout', 'custom_post_type_custom_sidebar' ); | |
/** | |
* @link https://codex.wordpress.org/Conditional_Tags | |
*/ | |
function custom_post_type_custom_sidebar( $sidebar ){ | |
$blog_archive_sidebar = astra_get_option('archive-post-sidebar-layout'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add Last Update date just after the Published date in post meta. | |
*/ | |
add_filter( 'astra_post_date', 'add_modified_date_to_post_meta' ); | |
function add_modified_date_to_post_meta( $output ){ | |
$modified_date = esc_html( get_the_modified_date() ); | |
$original_time = get_the_time('U'); | |
$modified_time = get_the_modified_time('U'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add "Read More" link to excerpts only (Excerpts which are the hand-crafted summaries of your content )) | |
add_filter('get_the_excerpt', 'custom_excerpt_read_more_link'); | |
function custom_excerpt_read_more_link($excerpt) { | |
$excerpt_more = ''; | |
$read_more_text = 'Read More »'; | |
if ( has_excerpt() && ! is_attachment() && get_post_type() == 'post' ) { | |
$excerpt_more = '<p class="read-more" ><a href="' . esc_url( get_permalink() ) . '"> '. $read_more_text . '</a></p>'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disable Author Archive link from Post Meta. | |
*/ | |
add_filter( 'astra_post_author', 'your_author_meta_update' ); | |
function your_author_meta_update( $output ){ | |
$author_info = sprintf( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying comments. | |
* | |
* This is the template that displays the area of the page that contains both the current comments | |
* and the comment form. | |
* | |
* @link https://codex.wordpress.org/Template_Hierarchy | |
* | |
* @package Astra |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add Default Previuos / Next lesson pagination to the lesson template of Lifter LMS | |
*/ | |
add_action( 'wp', 'add_lifter_lesson_navigation' ); | |
function add_lifter_lesson_navigation(){ | |
if ( class_exists( 'LifterLMS' ) ) { | |
if ( is_lesson() ) { |