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
| function custom_search_form( $form ) { | |
| $form = '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '"> | |
| <label> | |
| <span class="screen-reader-text">' . _x( 'Search for:', 'label', 'astra' ) . '</span> | |
| <input type="search" class="searce-field" ' . apply_filters( 'astra_search_field_toggle_data_attrs', '' ) . ' placeholder="' . apply_filters( 'astra_search_field_placeholder', esc_attr_x( 'Your place holder', 'placeholder', 'astra' ) ) . '" value="' . get_search_query() . '" name="s" role="search" tabindex="-1"/> | |
| </label> | |
| <input type="submit" class="search-submit" value="Search"> | |
| </form>'; | |
| return $form; |
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', 'featured_image_call_back'); | |
| function featured_image_call_back(){ | |
| if(is_shop()){ | |
| add_filter('astra_advanced_headers_title_bar_bg', 'adv_header_call_back'); | |
| function adv_header_call_back(){ | |
| //Your featured image URL here: | |
| return 'http://woo-commerce.test/wp-content/uploads/2020/05/men-fashion-free-img.jpg'; | |
| } |
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 add to cart from shop page. | |
| add_filter('astra_woo_shop_product_structure' , 'call_back_add_to_cart_shop'); | |
| //Remove add to cart from single product page. | |
| add_filter( 'astra_woo_single_product_structure' , 'call_back_add_to_cart' ); | |
| function call_back_add_to_cart_shop(){ | |
| $structure = astra_get_option( 'shop-product-structure' ); | |
| $add_to_cart_key = array_search('add_cart', $structure); | |
| unset($structure[$add_to_cart_key]); | |
| return $structure; |
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
| function woocommerce_template_loop_product_title(){ | |
| return ; | |
| } | |
| add_action('woocommerce_before_shop_loop_item_title','astra_woo_shop_products_title', 5); | |
| function astra_woo_shop_products_title() { | |
| echo '<a href="' . esc_url( get_the_permalink() ) . '" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">'; | |
| echo '<h2 class="woocommerce-loop-product__title">' . esc_html( get_the_title() ) . '</h2>'; |
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_prev_next' , 50 ); | |
| function remove_prev_next(){ | |
| remove_action( 'woocommerce_single_product_summary', array( ASTRA_Ext_WooCommerce_Markup::get_instance(), 'next_previous_links' ), 1, 0 ); | |
| } | |
| add_action('wp' , 'add_prev_next' , 100 ); | |
| function add_prev_next(){ | |
| if ( 'disable' != astra_get_option( 'single-product-nav-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
| add_filter( 'astra_system_fonts', 'my_custom_fonts' ); | |
| function my_custom_fonts(){ | |
| $system_custom_fonts = array( | |
| 'Helvetica' => array( | |
| 'fallback' => 'Verdana, Arial, sans-serif', | |
| 'weights' => array( | |
| '300', | |
| '400', | |
| '700', |
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_post_author_output' , 'call_back'); | |
| function call_back(){ | |
| $author_info_array = sprintf( | |
| '<div class="ast-single-author-box" %2$s itemscope itemtype="https://schema.org/Person">%1$s</div>', | |
| sprintf( | |
| '<div class="ast-author-meta"> <div class="about-author-title-wrapper"> <h3 class="about-author">%1$s</h3> </div> <div class="ast-author-details"> <div class="post-author-avatar">%2$s</div> <div class="post-author-bio"> <a class="url fn n" %6$s rel="author"> <h4 class="author-title" %7$s>%4$s</h4> </a> <div class="post-author-desc">%5$s</div> </div> </div> </div>', | |
| esc_html__( 'About The Author', 'astra-addon' ), | |
| get_avatar( get_the_author_meta( 'email' ), 100 ), |
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_post_author' , 'author_call_back', 15 ); | |
| function author_call_back(){ | |
| ob_start(); | |
| echo '<span '; | |
| echo astra_attr( | |
| 'post-meta-author', | |
| array( |
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( 'astra_primary_content_bottom' , 'author_meta_callback' ); | |
| function author_meta_callback(){ | |
| if ( 'post' !== get_post_type() ){ | |
| if (function_exists('astra_get_template')){ | |
| if ( astra_get_option( 'ast-author-info' ) && is_singular( ) ) { | |
| astra_get_template( 'blog-pro/template/author-info.php' ); | |
| } | |
| } | |
| } |
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('astra_single_post_title_after', 'callback_function'); | |
| function callback_function(){ | |
| if ( 'post' !== get_post_type() ){ | |
| $enable_meta = apply_filters( 'astra_blog_post_meta_enabled', '__return_true' ); | |
| $post_meta = astra_get_option( 'blog-meta' ); | |
| if ( is_array( $post_meta ) && $enable_meta ) { | |