Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #976262

    Hello,

    I would like to include our social icons (Facebook, Twitter, LinkedIn, basically everything that we configure in the Social Profiles area of the Enfold theme settings) in a footer widget column with a title such as “Connect with us”.

    Note: I don’t wnat them in the socket, which is the only way the theme settings will display them.

    I like the square icons that are displayed via the widget “RSS Link and Twitter Feed”.

    The website URL is https://divcorporate.wpengine.com
    When we launch the site, the URL will be http://diversifiedus.com (I can modify the domain in the code when the time comes to launch).

    Can you provide the HTML to place in the Widget area, and any necessary Quick CSS code?

    Thanks,
    Adam

    #976283

    if you like to obtain that very elegant – this is a custom widget i wrote for that case – code comes to function.php of your child-theme:
    The generated widget is called (as you see in the code). Enfold-Child-Social-Bookmarks

    /*** 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;
    }
    }

    to have the same look as other widgets – this comes to child-theme 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;
    }

    you then only have to pull that widget to your footer widget-area you like – title in your case is then: Connect with us

    #976287
    #976319

    Hi,

    Please refer to @Guenni007’s post above.

    @Guenni007
    Thanks as always :)

    Best regards,
    Yigit

    #978398

    It is really fun to share my work and knowledge here. ;)
    I really feel the enthusiasm to continue.

    #978466

    Thank you very much Guenni007! I was on vacation and didn’t have access for a few days. This is great, much appreciated.

    #978715

    Hi Adam,

    Thanks for the feedback and I’m glad you got it working :-)

    Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.