Skip to content

Instantly share code, notes, and snippets.

View aarifhsn's full-sized avatar

Md. Arif Hassan aarifhsn

View GitHub Profile
<div id="sticker" class="mainmenu">
<?php wp_nav_menu( array( 'theme_location' => 'main-menu') ); ?>
</div> <!--end mainmenu-->
<a class="small_device_menu" href="#"><img src="<?php echo get_template_directory_uri(); ?>/images/nav.png" alt="" />navigation</a>
<div class="small_menu_area"></div> <!--end small_menu_area-->
jQuery(document).ready(function(){
// clone a area/div and append it to another area/div
jQuery(".mainmenu ul:first-child").clone().appendTo(".small_menu_area");
});
<script type="text/javascript">
jQuery(document).ready(function(){
//remove then default action of anchor tag
jQuery("a.small_device_menu").click(function(event){
event.preventDefault();
jQuery("div.small_menu_area").slideToggle(); //styling with a slide of an element when click this
});
});
</script>
<?php query_posts('meta_key=post_views_count&orderby=meta_value_num&order=DESC&showposts=4'); ?>
<div class="your-class">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="your-single-class">
<?php the_post_thumbnail('your-image-size'); ?>
<h3><a href='<?php the_permalink() ?>'><?php the_title(); ?></a></h3>
<div class="date_comments">
<?php the_time(get_option('date_format')); ?>
<?php comments_number( '0', '1', '%' ); ?>
</div>
</div>
require_once ('admin/index.php');
$of_options[] = array( "name" => "Home Settings",
"type" => "heading"
);
$of_options[] = array( "name" => "Change logo",
"desc" => "your description",
"id" => "site_logo_upload",
"icon" => true,
"type" => "upload"
);
<div class="logo">
<?php global $data; ?>
<?php if($data['site_logo_upload']): ?>
<a href="<?php echo site_url(); ?>"><img src="<?php echo $data['site_logo_upload']; ?>" alt="<?php bloginfo('name'); ?> | <?php bloginfo('description'); ?>" /></a>
<?php else: ?>
<a href="<?php echo site_url(); ?>"><?php echo get_bloginfo('name'); ?></a>
<?php endif; ?>
</div>
add_action( 'woocommerce_before_customer_login_form', 'jk_login_message' );
function jk_login_message() {
if ( get_option( 'woocommerce_enable_myaccount_registration' ) == 'yes' ) {
?>
<div class="woocommerce-info">
<p><?php _e( 'Returning customers login. New users register for next time so you can:' ); ?></p>
<ul>
<li><?php _e( 'View your order history' ); ?></li>
<li><?php _e( 'Check on your orders' ); ?></li>
<li><?php _e( 'Edit your addresses' ); ?></li>