Skip to content

Instantly share code, notes, and snippets.

@Edwardtonnn

Edwardtonnn/_functions.php

Last active Nov 27, 2018
Embed
What would you like to do?
Holy Grail Genesis Function Edits 2.0.0
//* 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' );
//Add Font Awesome
add_action( 'genesis_meta', 'custom_meta' );
function custom_meta() {
?>
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,900" rel="stylesheet">
<?php
}
//* Load custom stylesheet and javascript (jquery enabled)
add_action( 'wp_enqueue_scripts', 'load_styles' );
function load_styles() {
wp_enqueue_style(
'custom',
get_stylesheet_directory_uri() . '/css/custom.css',
array(),
'1.0.0',
false,
'all' );
wp_enqueue_script(
'custom',
get_stylesheet_directory_uri() . '/js/custom.js',
array('jquery'),
null,
true
);
}
(function($) {
// $ Works! You can test it with next line if you like
console.log("I'm alive!");
})( jQuery );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment