Skip to content

Instantly share code, notes, and snippets.

View aarifhsn's full-sized avatar
🎯
Focusing

Md. Arif Hassan aarifhsn

🎯
Focusing
View GitHub Profile
<?php dynamic_sidebar('right_sidebar'); ?>
/**
* Register widgetized area and update sidebar with default widgets
*/
function thirteenmag_widget_areas() {
register_sidebar( array(
'name' => __( 'Top Sidebar', 'thirteenmag' ),
'id' => 'right_sidebar',
'before_widget' => '<div class="single_widget fix">',
'after_widget' => '</div>',
/**
* Replaces the excerpt "more" text by a link
*/
function thirteenmag_excerpt_more($more) {
global $post;
return '<a class="moretag" href="'. get_permalink($post->ID) . '"> Read the full article <i class="fa fa-share"></i> </a>';
}
add_filter('excerpt_more', 'thirteenmag_excerpt_more');
<?php if (function_exists("WpDevs_pagination")) {
WpDevs_pagination($wp_query->max_num_pages);
} ?>
/**
* Pagination
*/
function WpDevs_pagination($pages = '', $range = 4)
{
$showitems = ($range * 2)+1;
global $paged;
if(empty($paged)) $paged = 1;
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>
<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>
$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"
);
require_once ('admin/index.php');
<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>