Tagged: enfold, footer, social icons, social media
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
July 7, 2023 at 9:12 am #1412678
Hello,
How can I add social media icons to the footer widget? Not to the footer socket, I would like to add this to the footer widget. In the widget menu, I see a lot of enfold widget, but unfortunately I dont see the enfold social icons widget.
Thank you very much!
July 7, 2023 at 12:13 pm #1412690Hey Danii28,
Unfortunately there is not a specific widget to show the social icons, but you can use this shortcode solution by Guenni007 to create a shortcode [social-bookmarks] in a Custom HTML widget.Best regards,
MikeJuly 7, 2023 at 4:00 pm #1412697Yes that is a quick and dirty way:
A way to have there a widget :
/*** custom social bookmarks widget ****/ function social_bookmarks_register_widget() { register_widget( 'add_social_bookmarks' ); } add_action( 'widgets_init', 'social_bookmarks_register_widget' ); class add_social_bookmarks extends WP_Widget { public function __construct() { $widget_ops = array( 'classname' => 'socialbookmarks-widget', 'description' => __('A widget that displays the social bookmarks', 'avia_framework') ); parent::__construct( 'add_social_bookmarks', THEMENAME.' Social Bookmarks', $widget_ops ); } public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', $instance['title'] ); echo $args['before_widget']; //if title is present if ( ! empty( $title ) ) echo $args['before_title'] . $title . $args['after_title']; //output echo $before_widget; $social_args = array('outside'=>'ul', 'inside'=>'li', 'append' => ''); echo avia_social_media_icons($social_args, false); echo $after_widget; } public function form( $instance ) { if ( isset( $instance[ 'title' ] ) ) $title = $instance[ 'title' ]; else $title = __( 'Social Bookmarks', 'avia_framework' ); ?> <p> <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /> </p> <?php } public function update( $new_instance, $old_instance ) { $instance = array(); $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : ''; return $instance; } }
and for quick css:
#top .socialbookmarks-widget .social_bookmarks { float: left; margin: 15px 0 0 ; position: relative; } #top .socialbookmarks-widget .social_bookmarks li { float: left; clear: right !important; }
but: these are only the social button you have set on enfold options dialaog.
July 7, 2023 at 5:22 pm #1412702 -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.