Skip to content

Instantly share code, notes, and snippets.

View comment.css
/*Comment List styles
--------------------------------------------------------------*/
.form-item {
border: 1px solid #ffffff;
padding: 15px;
}
.comment-list .row {
margin-bottom: 0px;
@shehabkhan013
shehabkhan013 / admin.js
Last active Oct 6, 2018
CMB2 Post Format Interactivity Add
View admin.js
//includ the Js file is js folder
(function ($) {
$(document).ready(function () {
$("#post-formats-select .post-format").on("click", function () {
if ($(this).attr("id") == "post-format-image") {
$("#_alpha_image_information").show();
} else {
$("#_alpha_image_information").hide();
}
});
@shehabkhan013
shehabkhan013 / search.php
Last active Sep 1, 2018
WordPress All Functionality for Search Form
View search.php
/* Put the Search Form Start*/
<?php
if(is_search()){
?>
<h3><?php _e("You searched for","alpha") ?>: <?php the_search_query(); ?></h3>
<?php
}
?>
<?php
@shehabkhan013
shehabkhan013 / add_function.php
Created Jan 30, 2018
Wordpress Comment php file and Moving Input Field and Replay Button Click To not Page Loading Function
View add_function.php
// Replay Button Click To Page Note Loading
function consult_wpb_move_comment_field_to_bottom( $fields ) {
$comment_field = $fields['comment'];
unset( $fields['comment'] );
$fields['comment'] = $comment_field;
return $fields;
}
@shehabkhan013
shehabkhan013 / wp_author_meta.php
Created Jan 28, 2018
Wordpress Get Author Information In User Area
View wp_author_meta.php
//for user profile picture
<?php echo get_avatar(get_the_author_meta('ID'), 100);?>
//for user profile Name
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>"><?php the_author(); ?></a>
//for user discription
<?php echo get_the_author_meta('description'); ?>
@shehabkhan013
shehabkhan013 / blog-page.php
Created Jan 27, 2018
Wordpress Blog page Content Dynamic with while loop
View blog-page.php
<?php
if(have_posts()):
while(have_posts()): the_post();
?>
<div class="blog_left_single_item">
</div><!-- blog_left_single_item -->
<?php endwhile;?>
@shehabkhan013
shehabkhan013 / nav-menu.php
Created Jan 27, 2018
Wordpress Navigation menu Dynamic With dropdown Support
View nav-menu.php
//Must be included walker menu from wp-bootstrap-navwalker.php on github
register_nav_menus(array(
'header_menu' => 'Header Menu',
'footer_menu' => 'Footer Menu'
));
<?php
@shehabkhan013
shehabkhan013 / googlefonts.php
Last active Oct 9, 2018
Wordpress google fonts Dynamic
View googlefonts.php
//Refarence themeshaper
function theme_name_fonts_url() {
$fonts_url = '';
$OpenSans = _x( 'on', 'OpenSans font: on or off', 'theme-slug' );
$Montserrat = _x( 'on', 'Montserrat font: on or off', 'theme-slug' );
@shehabkhan013
shehabkhan013 / textanimation.js
Last active Jan 26, 2018
text animation js active (textillate.js)
View textanimation.js
$('.banner_effect').textillate({ in : {
effect: 'fadeInRight',
delayScale: 2
},
out: {
effect: 'flipOutY',
sync: true
},
loop: true
});
@shehabkhan013
shehabkhan013 / menu-active.js
Created Jan 23, 2018
menu-active > li addClass
View menu-active.js
li.current_page_item
--------------------------
$(".header-menu li a").each(function () {
if ($(this).attr("href") == pgurl || $(this).attr("href") == pgurl + '.html') {
$(this).parent().addClass("current_page_item");
$(this).parents('li').addClass("current_page_item");
}
});
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.