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 amar_pagination() { | |
global $wp_query; | |
$amar_links paginate_link(array( | |
'current' => max(1, get_query_var('paged')), | |
'total' => $wp_query->max_num_pages, | |
'type' => 'list', | |
)); |
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 | |
$cb_faq_cat = get_the_terms(get_the_ID(), 'cb_faq_cat'); | |
if(is_array($cb_faq_cat)) { | |
foreach ($cb_faq_cat as $cb_cat) { | |
echo esc_html($cb_cat->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 | |
function post_format_metabox_js() { | |
if( get_post_type() === 'post'): ?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function(){ | |
$id = jQuery('input[name="post_format"]:checked').attr('id'); |
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 Column for user id in user main page | |
function cb_author_user_id_column( $columns ) | |
{ | |
$columns['uid'] = 'ID'; | |
return $columns; | |
} | |
//print suer id to user column | |
function cb_author_user_id_display_column( $empty, $column_name, $user_id ) |
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
$(window).scroll(function() { | |
var windowSize = $(window).width(); | |
var kotoDur = $(window).scrollTop(); | |
var menurParHoisi = $(".header-section").scrollTop(); | |
if (kotoDur > menurParHoisi && windowSize > 767) { | |
$('.header-section').addClass('header-position-fixed'); | |
}else{ | |
$('.header-section').removeClass('header-position-fixed'); |
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 shape_custom_post_taxonomy() { | |
register_taxonomy( | |
'testimonial_category', //The name of the taxonomy. Name should be in slug form (must not contain capital letters or spaces). | |
'shape-testimonial', //post type name | |
array( | |
'hierarchical' => true, | |
'label' => 'Categories', //Display name | |
'query_var' => true, | |
'show_admin_column' => true, |
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_action( 'wp_enqueue_scripts', 'custom_disable_theme_js' ); | |
function custom_disable_theme_js() { | |
Fusion_Dynamic_JS::deregister_script('avada-comments'); | |
Fusion_Dynamic_JS::deregister_script('avada-general-footer'); | |
Fusion_Dynamic_JS::deregister_script('avada-mobile-image-hover'); | |
Fusion_Dynamic_JS::deregister_script('avada-quantity'); | |
Fusion_Dynamic_JS::deregister_script('avada-scrollspy'); | |
Fusion_Dynamic_JS::deregister_script('avada-select'); |