Skip to content

Instantly share code, notes, and snippets.

@GarySwift
Last active April 30, 2018 08:57
Show Gist options
  • Save GarySwift/690b413ac0303ac91ce0f0d7e3d852ee to your computer and use it in GitHub Desktop.
Save GarySwift/690b413ac0303ac91ce0f0d7e3d852ee to your computer and use it in GitHub Desktop.
Style for next and previous posts links. Adds font awesome icons to links. #FoundationPress #WordPress

Use Font Awesome to add Nav Arrows

Font Awesome 5 Update

.nav-next a:after, .nav-previous a:before  {
		font-family: 'Font Awesome\ 5 Free';
		font-weight: 900; /* Fix version 5.0.9 */
}

PHP enqueue css

// Enqueue the font awesome Stylesheet.
wp_enqueue_style( 'fontawesome', 'https://use.fontawesome.com/releases/v5.0.10/css/all.css', array(), '5.0.10', 'all' );	

or

PHP enqueue js

// Enqueue the font awesome script.
wp_enqueue_script( 'fontawesome', 'https://use.fontawesome.com/releases/v5.0.10/js/all.js', array(), '5.0.10', true );	
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment