Skip to content

Instantly share code, notes, and snippets.

View JohnBunka's full-sized avatar
🎯
Focusing

John Bunka JohnBunka

🎯
Focusing
View GitHub Profile
<ul class="fa-ul">
<li><i class="fa-li fa fa-check-square"></i>List icons</li>
<li><i class="fa-li fa fa-check-square"></i>can be used</li>
<li><i class="fa-li fa fa-spinner fa-spin"></i>as bullets</li>
<li><i class="fa-li fa fa-square"></i>in lists</li>
</ul>
<i class="fa fa-quote-left fa-3x fa-pull-left fa-border"></i>
...tomorrow we will run faster, stretch out our arms farther...
And then one fine morning— So we beat on, boats against the
current, borne back ceaselessly into the past.
<i class="fa fa-spinner fa-spin"></i>
<i class="fa fa-circle-o-notch fa-spin"></i>
<i class="fa fa-refresh fa-spin"></i>
<i class="fa fa-cog fa-spin"></i>
<i class="fa fa-spinner fa-pulse"></i>
@JohnBunka
JohnBunka / mobilemenu-old.php
Last active September 16, 2015 16:00
Adding the word ‘Menu’ next to the Hamburger icon in Caroline WordPress University Theme
$('.menu-primary').before('<button class="menu-toggle" role="button" aria-pressed="false"></button>'); // Add toggles to menus
@JohnBunka
JohnBunka / functions.php
Created November 13, 2015 23:23
How to Add Font Awesome Icons to Your WordPress Menu without a plugin
//* Make Font Awesome available
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.css' );
}
@JohnBunka
JohnBunka / single-portfolio.php
Created November 20, 2015 23:46
Display Advanced Custom Fields (ACF) in an Envira Gallery. From http://www.jowaltham.com/display-advanced-custom-fields-envira-gallery/
<?php
// Do NOT include the opening php tag above
add_action( 'genesis_entry_content', 'jmw_add_envira_gallery_after_content', 15 );
/*
* Add the gallery after the end of the content
*/
function jmw_add_envira_gallery_after_content() {
$gallery = get_post_meta( get_the_ID(), 'gallery' ); // 'gallery' is name of my ACF gallery field
@JohnBunka
JohnBunka / post-info-edit.php
Created January 9, 2016 23:50
Genesis Post Info
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Incoude this in Genesis imple edits or in your functions.php file or in a functionaility plugin.
//* Customize the post info function
add_filter( 'genesis_post_info', 'sp_post_info_filter' );
function sp_post_info_filter($post_info) {
if ( !is_page() ) {
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]';
return $post_info;
@JohnBunka
JohnBunka / wpconfig.php
Last active July 21, 2016 18:03
Relocate and update WordPress site URLs / Great when moving a site and updating the links
//* Update the URL for the site https://codex.wordpress.org/Changing_The_Site_URL
update_option('siteurl','http://example.com');
update_option('home','http://example.com');
@JohnBunka
JohnBunka / additional-or-custom-css.css
Last active October 2, 2017 16:36
How to create a fixed Top Bar Menu in Beaver Builder
/*
Add this to the Additional CSS area in the customizer or to the style.css in your child theme - More info and help at www.PressAvenue.com
or on the blog post https://pressavenue.com/create-fixed-top-bar-menu-beaver-builder
*/
.fl-page-bar {
position: fixed;
width: 100%;
z-index: 999;
}
.fl-page-header-fixed {
@JohnBunka
JohnBunka / functions-plugin.php
Created October 12, 2017 22:54
Move the Yoast SEO Meta Box to the Bottom of the edit screen in WordPress
/*-------------------------------------
Move the Yoast SEO Meta Box to the Bottom of the edit screen in WordPress
---------------------------------------*/
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');