This file contains 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
<header class="header-group" role="banner"> | |
<div class="header-inner"> | |
<div class="header-titles-wrapper"> | |
<div class="header-titles"> | |
<!-- .site-title or .site-logo --> | |
<h1 class="site-title"> | |
<a href="#">Site Title</a> | |
</h1> | |
<!-- .site-description --> | |
<div class="site-description">Site Description</div> |
This file contains 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_action( 'astra_content_loop', 'custom_post_type_loop_callback' ); | |
function custom_post_type_loop_callback(){ | |
if( "movies" == get_post_type() ) { | |
remove_action( 'astra_template_parts_content', array( Astra_Loop::get_instance(), 'template_parts_default' ) ); | |
remove_action( 'astra_template_parts_content', array( Astra_Loop::get_instance(), 'template_parts_post' ) ); | |
if ( is_singular( "movies" ) ) { | |
add_filter( 'astra_post_link', '__return_false' ); | |
} |
This file contains 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 | |
// Display a specific product tag on shop/category archive page. | |
add_action( 'woocommerce_before_shop_loop_item', 'woocommerce_poruct_tags_before_shop_loop', 7 ); | |
function woocommerce_poruct_tags_before_shop_loop(){ | |
// get product_tags of the current product | |
$current_tags = get_the_terms( get_the_ID(), 'product_tag' ); | |
//only start if we have some tags | |
if ( $current_tags && ! is_wp_error( $current_tags ) ) { |
This file contains 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 | |
/** | |
* Function to get Date of Post without published date. | |
*/ | |
if ( ! function_exists( 'astra_post_date' ) ) { | |
/** | |
* Function to get Date of Post |
This file contains 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 secondary logo for for a specific pages. */ | |
add_filter( 'get_custom_logo', 'custom_secondary_logo_callback' ); | |
/** | |
* @link https://codex.wordpress.org/Conditional_Tags | |
*/ | |
function custom_secondary_logo_callback( $logo ){ | |
$your_custom_logo = "Your Custom Logo";// Add your custom logo maerkup instead. | |
// is_singular() find more conditional tags from here -- https://codex.wordpress.org/Conditional_Tags |
This file contains 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 | |
// enqueue styles for child theme | |
function example_enqueue_styles() { | |
// enqueue parent styles | |
// Add style.css inside the /assets/css/ directory. | |
wp_enqueue_style('parent-theme', get_template_directory_uri() .'/assets/css/style.css'); | |
} | |
add_action('wp_enqueue_scripts', 'example_enqueue_styles'); |
This file contains 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 | |
// Remove default Astra Post's Pagination. | |
remove_action( 'astra_entry_after', 'astra_single_post_navigation_markup' ); | |
// Add Previous Post| Next Post Link for Post's Pagination. | |
add_action( 'astra_entry_after', 'astra_single_post_custom_navigation_markup' ); | |
function astra_single_post_custom_navigation_markup() { | |
$single_post_navigation_enabled = apply_filters( 'astra_single_post_navigation_enabled', true ); |
This file contains 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 | |
/** | |
* Update the featured images size from Astra | |
*/ | |
add_filter( 'astra_post_thumbnail_default_size', 'update_featured_images_size_callback' ); | |
function update_featured_images_size_callback( $size ) { | |
$size = array( 500, 500 ); // Update the 500(Width), 500(Height) as per your requirment. | |
return $size; | |
} |
This file contains 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 cotnent above the Archive page's each post's title before | |
*/ | |
add_action( 'astra_archive_post_title_before', 'astra_child_add_content_before_archive_post_title' ); | |
function astra_child_add_content_before_archive_post_title() { | |
echo "Add Your content before the archive pages post title"; | |
} |
This file contains 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 | |
/** | |
* Shop page - Show all categories for each product on shop page | |
*/ | |
if ( ! function_exists( 'astra_woo_shop_parent_category' ) ) : | |
function astra_woo_shop_parent_category() { | |
if ( apply_filters( 'astra_woo_shop_parent_category', true ) ) : ?> | |
<span class="ast-woo-product-category"> | |
<?php |
NewerOlder