Skip to content

Instantly share code, notes, and snippets.

@sudipbd
sudipbd / style.css
Last active December 1, 2016 08:06
WordPress comments CSS
ol.commentlist{
margin: 10px 5px;
padding: 10px;
}
.commentlist .comment-body{
padding: 10px;
background: #EFEFEF;
border: solid thin #DEDEDE;
margin: 10px 0;
position: relative;
@sudipbd
sudipbd / style.css
Created December 1, 2016 05:05
WordPress default styles
/* wordpress default */
img.alignright {float:right; margin:0 0 1em 1em}
img.alignleft {float:left; margin:0 1em 1em 0}
img.aligncenter {display: block; margin-left: auto; margin-right: auto}
a img.alignright {float:right; margin:0 0 1em 1em}
a img.alignleft {float:left; margin:0 1em 1em 0}
a img.aligncenter {display: block; margin-left: auto; margin-right: auto}
em{font-style: italic;}
@sudipbd
sudipbd / index.php
Created November 30, 2016 05:48
WordPress comments template
<?php comments_template( '', true ); ?>
@sudipbd
sudipbd / functions.php
Created November 26, 2016 07:12
WordPress registering a sidebar
<?php
function desh_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'twentysixteen' ),
'id' => 'blogroll',
'description' => __( 'Add widgets here to appear in your sidebar.', 'twentysixteen' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h5>',
'after_title' => '</h5>',
@sudipbd
sudipbd / functions.php
Created November 25, 2016 16:51
WordPress additional class to first div, li
jQuery(document).ready(function(){
jQuery("ol.carousel-indicators li:first-child").addClass("active");
});
@sudipbd
sudipbd / functions.php
Last active December 11, 2016 08:00
WordPress jQuery
wp_enqueue_script('jquery');
@sudipbd
sudipbd / index.php
Created November 25, 2016 16:48
WordPress image URL
<?php
$thumb_id = get_post_thumbnail_id();
$thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail-size', true);
$thumb_url = $thumb_url_array[0];
?>
<?php echo $thumb_url; ?>
@sudipbd
sudipbd / index.html
Created November 22, 2016 05:32
Owl Carousel with progress and navigation icons
<div class="slider">
<div class="container-fluid no-padding no-margin">
<div class="row">
<div class="col-md-12">
<div id="slider-items" class="owl-carousel owl-theme">
<div class="item">
<img src="img/fullimage1.jpg" alt="The Last of us">
<p class="caption">Beautiful Bangladesh</p>
</div>
<div class="item">
@sudipbd
sudipbd / style.css
Created November 19, 2016 08:45
WordPress theme basic info
/*
Theme Name: Twenty Sixteen
Theme URI: https://wordpress.org/themes/twentysixteen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere.
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, right-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, blog
@sudipbd
sudipbd / functions.php
Last active November 19, 2016 08:30
WordPress body class for device(s) and browser(s) and platform(s)
<?php
function mv_browser_body_class($classes) {
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
if($is_lynx) $classes[] = 'lynx';
elseif($is_gecko) $classes[] = 'gecko';
elseif($is_opera) $classes[] = 'opera';
elseif($is_NS4) $classes[] = 'ns4';
elseif($is_safari) $classes[] = 'safari';
elseif($is_chrome) $classes[] = 'chrome';