Skip to content

Instantly share code, notes, and snippets.

View EastSideCode's full-sized avatar

East Side Code EastSideCode

View GitHub Profile
@EastSideCode
EastSideCode / functions.php
Created November 13, 2017 20:11
Add a custom link to WordPress menu if needed
// Add custom link to WordPress menu
add_filter( 'wp_nav_menu_items', 'my_nav_menu_custom_link' );
function my_nav_menu_custom_link($menu) {
// generate the link in a variable
$customLink = '<li class="menu-item"><a href="#">Custom Link Text</a></li>';
// convert the standard menu to an array
@EastSideCode
EastSideCode / style.css
Created April 25, 2017 17:33
Expand arrows on NextGen Gallery with fancybox to edge of browser window
#fancybox-left, #fancybox-right {position: fixed !important; visibility: visible !important;}
#fancybox-right span { left: auto; right: 20px; }
#fancybox-left span { left: 20px; }
#fancybox-close {position: fixed !important; top: 20px !important; right: 20px !important;}
@EastSideCode
EastSideCode / functions.php
Created February 22, 2017 13:11
WordPress Child theme functions.php
<?php
function add_parent_styles() {
wp_enqueue_style('parent-style', get_template_directory_uri().'/style.css');
}
add_action('wp_enqueue_scripts', 'add_parent_styles');
/* Smaller than standard 960 (devices and browsers) */
@media (max-width: 959px) {}
/* Tablet Portrait size to standard 960 (devices and browsers) */
@media (min-width: 768px) and (max-width: 959px) {}
/* All Mobile Sizes (devices and browser) */
@media (max-width: 767px) {}
/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */