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
--------------------Post timing ago---------------------- | |
function time_ago( $type = 'post' ) { | |
$d = 'comment' == $type ? 'get_comment_time' : 'get_post_time'; | |
return human_time_diff($d('U'), current_time('timestamp')) . " " . __('ago'); | |
} | |
<?php echo time_ago(); ?> |
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 | |
if (get_query_var('paged')) { | |
$paged = get_query_var('paged'); | |
} | |
elseif (get_query_var('page')) { | |
$paged = get_query_var('page'); | |
} else { | |
$paged = 1; | |
}?> |
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 | |
/** | |
* Template Name: blog | |
* | |
* @package project2 | |
* @subpackage project2 | |
* @since project2 | |
*/ | |
get_header() |
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
======================= comment blog section removed url field ============================================== | |
function wpb_disable_comment_url($fields) | |
{ | |
unset($fields['url']); | |
return $fields; | |
} | |
add_filter('comment_form_default_fields','wpb_disable_comment_url'); |
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
========================Contact form after submit redirect for all form=========== | |
<script> | |
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
location = 'https://wp.goigi.me/readysetboom/wp-admin/upload.php?item=146'; | |
}, false ); | |
</script> | |
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
==========================Contact Form 7 stop conflicting with other jquery ======================================= | |
// De-register jQuery from Contact Form 7 | |
add_action('wp_print_scripts','my_deregister_javascript', 100); | |
function my_deregister_javascript() { | |
wp_deregister_script('contact-form-7'); | |
} |
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 | |
$args = array('post_type' => 'product', | |
'meta_key' => '_featured', | |
'meta_value' => 'yes', | |
'posts_per_page' => 1 ); | |
$loop = new WP_Query( $args ); | |
if ( $loop->have_posts() ) { | |
while ( $loop->have_posts() ) : $loop->the_post(); | |
wc_get_template_part( 'content', 'product_3' ); | |
endwhile; |
NewerOlder