Skip to content

Instantly share code, notes, and snippets.

View prosantamazumder's full-sized avatar

Prosanta Mazumder prosantamazumder

View GitHub Profile
@prosantamazumder
prosantamazumder / smooth Scroll Section by ID.js
Last active May 27, 2020 10:13
smooth Scroll Section by ID
function smoothScrollSectionID() {
$('.main-nav li > a').on('click', function (event) {
var target = $(this.getAttribute('href'));
if (target.length) {
event.preventDefault();
$('html, body').stop().animate({
scrollTop: target.offset().top - 80
}, 1000);
}
});
@prosantamazumder
prosantamazumder / PHP – MySQL visitor counter.php
Last active April 5, 2020 12:10
PHP – MySQL visitor counter
<?php
$servername = "localhost";
$username = "dbuser";
$password = "dbpassword";
$dbname = "dbname";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
git config --global user.name "prosantomazumder"
git config --global user.email "[email protected]"
$ git init
$ git ls
$ git status
$ git add *
$ git commit -m "version 1.0.1"
$ git status
$ git push
$ git remote add origin "Git Repository URL here"
@prosantamazumder
prosantamazumder / Standard Contact.m
Last active April 12, 2020 19:40
student Admission From
<div class="row">
<div class="col-lg-12">
<div class="row form">
<div class="col-lg-12 form-head">
<h3>PERSONAL &amp; CONTACT INFORMATION</h3>
</div>
<div class="col-lg-12 col-sm-12">
[text* student_name class:form-control placeholder "Student Name*"]
</div>
<div class="col-lg-6 col-sm-6">
@prosantamazumder
prosantamazumder / wordpress-post-next-previous-link.php
Created April 19, 2020 08:25
WordPress Get Next Post and Previous Post Link
<div class="col-sm-12">
<div class="theme-pagination">
<ul class="list-inline text-center">
<?php // if need post next previous
$prev_post = get_previous_post();
$id = $prev_post->ID ;
$permalink = get_permalink( $id );
?>
<?php
@prosantamazumder
prosantamazumder / Display-wordpress-popular-tags.php
Created April 19, 2020 08:29
WordPress Display Custom Post Tags in single page.php
@prosantamazumder
prosantamazumder / Display-wordpress-category-default-post-.php
Created April 19, 2020 08:38
WordPress Display Custom Post Category in single page.php
<div class="sidebar-tags">
<?php
$categories = get_the_category( $post->ID );
foreach ( $categories as $category ):
?>
<a href="<?php echo esc_url( get_category_link( $category->term_id ) ); ?>"><?php echo esc_html( $category->name ); ?></a>';
<?php endforeach; ?>
</div>
@prosantamazumder
prosantamazumder / RegisterSidebar.m
Last active April 27, 2020 21:11
Register Sidebar / Widgets
//Code added Function.php
function wpb_widgets_init() {
register_sidebar( array(
'name' => __( 'Main Sidebar', 'wpb' ),
'id' => 'sidebar-1',
'description' => __( 'The main sidebar appears on the right on each page except the blog page', 'wpb' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
@prosantamazumder
prosantamazumder / Custom Comments Template.php
Created May 2, 2020 22:05
WordPress Custom Comments Template
<?php
$default_avatar = 'http://zacvineyard.com/blog/wp-content/themes/zac/images/default-avatar.png';
?>
<a id="comments"></a>
<h2>Comments</h2>
<?php if($comments) : ?>
<ol class="comments">
<?php foreach($comments as $comment) : ?>
<li id="comment-<?php comment_ID(); ?>" class="<?php if ($comment->user_id == 1) echo "authcomment";?>">
<?php if ($comment->comment_approved == '0') : ?>
NO NEED
wp-content\themes\veera\framework\classes\class-admin.php
-------------------------------------------------------
<li class="filter active" data-filter="all">Show All</li>
<?php
$topics = get_terms( array(
'hide_empty' => 0,
'taxonomy' => 'portfolio_cat',
'orderby' => 'id',