Skip to content

Instantly share code, notes, and snippets.

View ThemeBing's full-sized avatar
🏠
Working from office

ThemeBing ThemeBing

🏠
Working from office
View GitHub Profile
@ThemeBing
ThemeBing / laravellocal.md
Created June 8, 2021 11:33 — forked from hootlex/laravellocal.md
Run laravel project locally

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci
<?php
function themename_customize_register($wp_customize){
$wp_customize->add_section('themename_color_scheme', array(
'title' => __('Color Scheme', 'themename'),
'priority' => 120,
));
// =============================
@ThemeBing
ThemeBing / add-to-menu.php
Created July 16, 2019 04:17 — forked from shizhua/add-to-menu.php
WordPress AJAX Login/Register
<?php
/**
* Automatically add a Login link to Primary Menu
*/
add_filter( 'wp_nav_menu_items', 'pt_login_link_to_menu', 10, 2 );
function pt_login_link_to_menu ( $items, $args ) {
if( ! is_user_logged_in() && $args->theme_location == apply_filters('login_menu_location', 'primary') ) {
$items .= '<li class="menu-item login-link"><a href="#pt-login">'.__( 'Login/Register', 'ptheme' ).'</a></li>';
}
return $items;
@ThemeBing
ThemeBing / meta-tags.md
Created March 30, 2019 04:50 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">