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 | |
/** | |
* Author: Hannan | |
* Desc: Add extra - something at the end part of advance search box. | |
* Date: 29.01.2023 | |
* */ | |
function codeastrology_search_end_part( ){ | |
return sprintf('<a href="%s" class="button"> %s</a>','https://www.google.com/','Google Search'); | |
} |
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 | |
/* | |
@author: Hannan- CodeAstrology | |
@date: 22.01.2023 | |
@description: Get prodcut table pagination arguments | |
*/ | |
function codeastrology_pagination( $args ){ | |
// var_dump($args); |
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 | |
/* | |
Author: Hannan ( CodeAstrology) | |
Date: 22.01.23 | |
Description: change the product table mini filter default taxonomy label and taxonomy name. | |
*/ | |
function codeastrology_minifilter_taxonomy_name( $label, $texonomy_name ){ | |
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 | |
<meta name="description" content="This is the description sentence or short paragraph about the article or post." /> |
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 | |
function codeastrology_meta_description() { | |
global $post; | |
if ( is_singular() ) { | |
$des_post = strip_tags( $post->post_content ); | |
$des_post = strip_shortcodes( $post->post_content ); | |
$des_post = str_replace( array("\n", "\r", "\t"), ' ', $des_post ); | |
$des_post = mb_substr( $des_post, 0, 300, 'utf8' ); | |
echo '<meta name="description" content="' . $des_post . '" />' . "\n"; | |
} |
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 | |
/* change product table query arguments */ | |
function codeastrology_custom_query( $args, $shortcode ){ | |
//var_dump($shortcode); //You can more customise using $shortcode | |
$args['posts_per_page'] = 2; | |
return $args; | |
} | |
add_filter('wpt_query_args','codeastrology_custom_query', 10, 2); |
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 | |
/* To change product table view cart text*/ | |
function codeastrology_view_cart_text( $text ){ | |
$text = "Basket"; | |
return $text; | |
} | |
add_filter('wpt_view_cart_text','codeastrology_view_cart_text'); |