Skip to content

Instantly share code, notes, and snippets.

View mohanrangasamy's full-sized avatar
🎯
Focusing

Mohan Kumar Rangasamy mohanrangasamy

🎯
Focusing
  • Zudo Innovations
  • Chennai
View GitHub Profile
@morgyface
morgyface / social.php
Last active April 11, 2024 22:37
WordPress | ACF | Social Media Links using Advanced Custom Fields and FontAwesome
<?php
if( have_rows('social_media', 'option') ):
echo '<div class="container social my-4">';
echo '<p class="follow mb-0 align-middle">Follow us</p>';
echo '<ul class="nav align-middle">';
while ( have_rows('social_media', 'option') ) : the_row();
$socialchannel = get_sub_field('social_channel', 'option');
$socialurl = get_sub_field('social_url', 'option');
echo '<li class="nav-item">';
echo '<a class="nav-link" rel="nofollow noopener noreferrer" href="' . $socialurl . '" target="_blank">';
@gyrus
gyrus / gist:3155971
Created July 21, 2012 14:35
WordPress custom post type taxonomy list filters
<?php
/**
* Taxonomy list filters and columns
*
* @todo Test!
* @todo Need replacement function for slt_terms_list()
* @link http://wordpress.stackexchange.com/questions/578/adding-a-taxonomy-filter-to-admin-list-for-a-custom-post-type/3215#3215
*/
add_action( 'restrict_manage_posts', 'pilau_restrict_manage_posts' );