I found the answer!
Thanks for the reply. However, you have misunderstood the problem. I did not have a problem using fontawesome v5. My problem was using the code in functions.php in Quark, which delivers the Social Media Menu. Whereas all entries in this menu previously fed class ‘fa’, they now have to feed either ‘fab’ or ‘fas’, depending on whether or not the icon is a brand or not.
This was a typical line for a social media icon.
array( 'url' => of_get_option( 'social_twitter', '' ), 'icon' => 'fa-twitter', 'title' => esc_html__( 'Follow me on Twitter', 'qohelet' ) ),
And all the social media icons were then delivered with:
$output .= sprintf( '<li><a href="%1$s" title="%2$s"%3$s><span class="fa-stack fa-lg"><i class="fas fa-square fa-stack-2x"></i><i class="fa %4$s fa-stack-1x fa-inverse"></i></span></a></li>',
esc_url( $value ),
$key['title'],
( !of_get_option( 'social_newtab', '0' ) ? '' : ' target="_blank"' ),
$key['icon']
);
I have found my own solution. I have now included the class with the of_get_option. Here are two examples:
array( 'url' => of_get_option( 'social_twitter', '' ), 'icon' => 'fab fa-twitter', 'title' => esc_html__( 'Follow me on Twitter', 'qohelet' ) ),
array( 'url' => of_get_option( 'social_rss', '' ), 'icon' => 'fas fa-rss', 'title' => esc_html__( 'Subscribe to my RSS Feed', 'qohelet' ) ),
Then I removed the ‘fa’ class from the sprintf functions, thus:
$output .= sprintf( '<li><a href="%1$s"><span class="fa-stack fa-lg"><i class="fas fa-square fa-stack-2x"></i><i class="fa %4$s fa-stack-1x fa-inverse"></i></span></a></li>',
esc_url( $value ),
$key['title'],
( !of_get_option( 'social_newtab', '0' ) ? '' : ' target="_blank"' ),
$key['icon']
);
I hope you can see the differences. This needs to be amended in your functions.php file within Quark. It may be a problem that I created myself, because I wanted an RSS icon, and a Podcast icon, but you can no longer rely on all the fontawesome icons being the same class – some are fas and some are fab.
-
This reply was modified 6 years, 1 month ago by
Paul Taylor.