Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Edward Edwardtonnn

🎯
Focusing
  • Los Angeles Web Club
  • South Gate, CA
View GitHub Profile
@studiopress
studiopress / nav-extras.php
Last active Jun 3, 2020
Modify the nav extras.
View nav-extras.php
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
add_filter( 'wp_nav_menu_items', 'theme_menu_extras', 10, 2 );
/**
* Filter menu items, appending either a search form or today's date.
*
* @param string $menu HTML string of list items.
* @param stdClass $args Menu arguments.
*
@Edwardtonnn
Edwardtonnn / _functions.php
Last active Nov 27, 2018
Holy Grail Genesis Function Edits 2.0.0
View _functions.php
//* Customize Footer
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'custom_footer' );
function custom_footer() {
?>
<p>&copy; Copyright 2018 <a href="#">My Domain</a> &middot; All Rights Reserved &middot; Powered by <a href="http://wordpress.org/">WordPress</a> &middot; <a href="http://mydomain.com/wp-admin">Aline Inc.</a></p>
<?php
}
//* Remove the edit link
add_filter ( 'genesis_edit_post_link' , '__return_false' );
View functions.php
<?php
// Drop Slick Slider files inside of js folder and add the following to your functions.php
//Slick Slider JS
add_action('wp_enqueue_scripts', 'load_slick', 5);
function load_slick(){
// Slick Slider JS
wp_enqueue_script(
'slick',
get_stylesheet_directory_uri() . '/js/slick/slick.js',
@Edwardtonnn
Edwardtonnn / functions.php
Last active Jul 11, 2018
Holy Grail of All Genesis
View functions.php
<?php
//Only Code Below This Line
//_________________________________________
//* Customize the entire footer
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'custom_footer' );
function custom_footer() {
@Edwardtonnn
Edwardtonnn / custom.js
Last active Jul 11, 2018
wp_enqueue script
View custom.js
(function($) {
// $ Works! You can test it with next line if you like
console.log("I'm alive!");
})( jQuery );
@Edwardtonnn
Edwardtonnn / functions.php
Last active Jul 11, 2018
Genesis Enqueue Styles Function
View functions.php
<?php
//Do not include opening <?php tag
//* Load custom style sheet
add_action( 'wp_enqueue_scripts', 'load_styles' );
function load_styles() {
wp_enqueue_style(
'custom',
get_stylesheet_directory_uri() . '/css/custom.css',