Skip to content

Instantly share code, notes, and snippets.

View milapdave's full-sized avatar

Milap Dave milapdave

View GitHub Profile
@milapdave
milapdave / widget-css-for-wp.css
Created November 11, 2022 10:26 — forked from humayunahmed8/widget-css-for-wp.css
Widget CSS for WordPress
/*=====================================
Widget CSS
=======================================*/
.widget-area ul {
list-style: none;
margin: 0;
padding: 0;
}
@milapdave
milapdave / wp-comment-form-style.css
Created November 11, 2022 10:26 — forked from humayunahmed8/wp-comment-form-style.css
Comment form template CSS for WordPress
/*=====================================
Comment Template CSS
========================================*/
.comments-area {
margin-top: 40px;
}
.comments-area h2.comments-title {
font-size: 25px;
if ( ! function_exists( 'prefix_fonts_url' ) ) :
/**
* Register Google fonts.
*
* @return string Google fonts URL for the theme.
*/
function prefix_fonts_url() {
$fonts_url = '';
$fonts = array();
$subsets = '';
@milapdave
milapdave / register-sidbar.php
Created November 11, 2022 10:35 — forked from humayunahmed8/register-sidbar.php
Register sidebar
<?php
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function stock_humayunbd_widgets_init() {
register_sidebar( array(
@milapdave
milapdave / 1-wp_nav_menu.php
Created November 11, 2022 10:35 — forked from humayunahmed8/1-wp_nav_menu.php
WP Navigation Menus
<?php
// Display Menus on Theme
wp_nav_menu(
array(
'theme_location' => 'header-menu',
'container' => 'div',
'container_class' => 'navbar-collapse collapse align-left',
'menu_class' => 'nav navbar-nav',
@milapdave
milapdave / custom_logo.php
Created November 11, 2022 10:35 — forked from humayunahmed8/custom_logo.php
WP Custom Logo
<?php
<div class="logo">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<?php $logo_id = get_theme_mod('custom_logo'); ?>
<?php if(!empty($logo_id)) : the_custom_logo(); else : ?>
<h3><?php bloginfo( 'name' ); ?></h3>
<?php endif; ?>
<?php
/**
* Short custom post type
*/
function my_theme_custom_post() {
register_post_type( 'cpt',
array(
'labels' => array(