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
add_filter( 'astra_enable_default_fonts', 'temp_disable_astra_fonts' ); | |
function temp_disable_astra_fonts( $load ) { | |
$load = false; | |
return $load; | |
} | |
add_action( 'wp_head', 'add_astra_fonts_preload', 1 ); | |
function add_astra_fonts_preload() { | |
?> | |
<link rel="preload" href="<?php echo get_site_url(); ?>/wp-content/themes/astra/assets/fonts/astra.woff" as="font" crossorigin /> | |
<link rel="preload" href="<?php echo get_site_url(); ?>/wp-content/themes/astra/assets/fonts/astra.ttf" as="font" crossorigin /> |
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
add_action( 'wp', 'remove_astra_woocommerce_action', 11 ); | |
function remove_astra_woocommerce_action(){ | |
if( is_callable( 'ASTRA_Ext_WooCommerce_Markup::get_instance' ) ) { | |
remove_action( 'woocommerce_single_product_summary', array( ASTRA_Ext_WooCommerce_Markup::get_instance(), 'product_navigation_wrapper_start' ), 1, 0 ); | |
remove_action( 'woocommerce_single_product_summary', array( ASTRA_Ext_WooCommerce_Markup::get_instance(), 'next_previous_links' ), 1, 0 ); | |
remove_action( 'woocommerce_single_product_summary', array( ASTRA_Ext_WooCommerce_Markup::get_instance(), 'product_navigation_wrapper_end' ), 1, 0 ); | |
} | |
} | |
add_action( 'wp', 'add_new_navigation_markup' ); |
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
add_filter( 'astra_advanced_header_layout_1_title_tag', 'change_title_tag', 10, 1 ); | |
add_filter( 'astra_advanced_header_layout_2_title_tag', 'change_title_tag', 10, 1 ); | |
function change_title_tag( $tag ) { | |
$tag = 'h6'; | |
return $tag; | |
} |
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
add_filter( 'astra_advanced_header_layout_1_title_tag', 'change_title_tag', 10, 1 ); | |
add_filter( 'astra_advanced_header_layout_2_title_tag', 'change_title_tag', 10, 1 ); | |
function change_title_tag( $tag ) { | |
$tag = 'h6'; | |
return $tag; | |
} |
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
add_filter( 'astra_advanced_header_layout_1_title_tag', 'change_title_tag', 10, 1 ); | |
add_filter( 'astra_advanced_header_layout_2_title_tag', 'change_title_tag', 10, 1 ); | |
function change_title_tag( $tag ) { | |
$tag = 'h6'; | |
return $tag; | |
} |
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 | |
/** | |
* Blog Pro - Blog Layout 3 Template | |
* | |
* @todo Update this template for Default Blog Style | |
* | |
* @package Astra Addon | |
*/ | |
?> |
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 | |
$uri = ltrim( $_SERVER['REQUEST_URI'], '/' ); // Removes the leading slash. | |
$uri = rtrim( $uri, '/' ); // Removes the trailing slash. | |
$uri = str_replace('/', ' ', $uri); // Replaces the slashes with spaces. | |
?> | |
<script type="text/javascript" src="a.remarketstats.com/px/smart/?c=222ccaf40d04fb6&seg=<?php echo $uri; ?>" ></script> |
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
add_action( 'wp_enqueue_scripts', function() { | |
if ( ! class_exists( 'Elementor\Core\Files\CSS\Post' ) ) { | |
return; | |
} | |
// Add your header page id here. | |
$header_page_id = 3499; | |
$css_file = new Elementor\Core\Files\CSS\Post( $header_page_id ); | |
$css_file->enqueue(); |
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
// Remove CSS style coming from custom fonts. | |
add_action( 'wp', 'remove_styles' ); | |
function remove_styles() { | |
if( class_exists( 'Bsf_Custom_Fonts_Render' ) ) { | |
remove_action( 'wp_head', array( Bsf_Custom_Fonts_Render::get_instance(), 'add_style' ) ); | |
} | |
} |
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
//Insert ads after fifth and seventh paragraph of single post content. | |
add_filter( 'the_content', 'prefix_insert_post_ads' ); | |
function prefix_insert_post_ads( $content ) { | |
// Add your after 5th paragraph ad code first and then the 7th paragraph ads code. | |
$ad_code = array( | |
'<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
<!-- Mypt3 300x250 (M) --> | |
<ins class="adsbygoogle" |
NewerOlder