Home Forums Basel support forum SOCIAL LINKS – VIDEO BACKGROUND – RECENT POST HOMEPAGE Reply To: SOCIAL LINKS – VIDEO BACKGROUND – RECENT POST HOMEPAGE

#1508

Artem Temos
Keymaster

Hello there,

Thank you for being with us.

1. Where exactly do you want to put it?

2. You can change the order only by customizing file basel/inc/shortcodes.php. You can override social buttons function in your child theme. You can do this by placing it’s code into basel child functions.php

function basel_shortcode_social($atts) {
	extract(shortcode_atts( array(
		'type' => 'share',
		'align' => 'center',
		'tooltip' => 'no',
		'style' => 'default', // circle colored 
		'size' => 'default', // circle colored 
		'el_class' => '',
	), $atts ));

	$target = "_blank";

	$thumb_id = get_post_thumbnail_id();
	$thumb_url = wp_get_attachment_image_src($thumb_id, 'thumbnail-size', true);

	ob_start();
	?>
	
		<ul class="social-icons text-<?php echo esc_attr( $align ); ?> icons-design-<?php echo esc_attr( $style ); ?> icons-size-<?php echo esc_attr( $size ); ?> social-<?php echo esc_attr( $type ); ?> <?php echo esc_attr( $el_class ); ?>">
			<?php if ( basel_get_opt( 'social_email' ) != ''): ?>
				<li class="social-email"><a href="mailto:<?php echo ($type == 'follow') ? basel_get_opt( 'social_email' ) : basel_get_opt( 'social_email' ) . '?subject=' . __('Check this ', 'xtemos') . get_the_permalink(); ?>" target="<?php echo esc_attr( $target ); ?>" class="<?php if( $tooltip == "yes" ) echo 'basel-tooltip'; ?>"><i class="fa fa-envelope"></i><?php _e('Email', 'xtemos') ?></a></li>
			<?php endif ?>

			<?php if ( $type == 'share' || basel_get_opt( 'fb_link' ) != ''): ?>
				<li class="social-facebook"><a href="<?php echo ($type == 'follow') ? basel_get_opt( 'fb_link' ) : 'https://www.facebook.com/sharer/sharer.php?u=' . get_the_permalink(); ?>" target="<?php echo esc_attr( $target ); ?>" class="<?php if( $tooltip == "yes" ) echo 'basel-tooltip'; ?>"><i class="fa fa-facebook"></i><?php _e('Facebook', 'xtemos') ?></a></li>
			<?php endif ?>

			<?php if ( $type == 'share' || basel_get_opt( 'twitter_link' ) != ''): ?>
				<li class="social-twitter"><a href="<?php echo ($type == 'follow') ? basel_get_opt( 'twitter_link' ) : 'http://twitter.com/share?url=' . get_the_permalink(); ?>" target="<?php echo esc_attr( $target ); ?>" class="<?php if( $tooltip == "yes" ) echo 'basel-tooltip'; ?>"><i class="fa fa-twitter"></i><?php _e('Twitter', 'xtemos') ?></a></li>
			<?php endif ?>

			<?php if ( $type == 'share' || basel_get_opt( 'google_link' ) != ''): ?>
				<li class="social-google"><a href="<?php echo ($type == 'follow') ? basel_get_opt( 'google_link' ) : 'http://plus.google.com/share?url=' . get_the_permalink(); ?>" target="<?php echo esc_attr( $target ); ?>" class="<?php if( $tooltip == "yes" ) echo 'basel-tooltip'; ?>"><i class="fa fa-google-plus"></i><?php _e('Google', 'xtemos') ?></a></li>
			<?php endif ?>

			<?php if ( $type == 'follow' && basel_get_opt( 'isntagram_link' ) != ''): ?>
				<li class="social-instagram"><a href="<?php echo ($type == 'follow') ? basel_get_opt( 'isntagram_link' ) : '' . get_the_permalink(); ?>" target="<?php echo esc_attr( $target ); ?>" class="<?php if( $tooltip == "yes" ) echo 'basel-tooltip'; ?>"><i class="fa fa-instagram"></i><?php _e('Instagram', 'xtemos') ?></a></li>
			<?php endif ?>

			<?php if ( $type == 'share' || basel_get_opt( 'pinterest_link' ) != ''): ?>
				<li class="social-pinterest"><a href="<?php echo ($type == 'follow') ? basel_get_opt( 'pinterest_link' ) : 'http://pinterest.com/pin/create/button/?url=' . get_the_permalink() . '&media=' . $thumb_url[0]; ?>" target="<?php echo esc_attr( $target ); ?>" class="<?php if( $tooltip == "yes" ) echo 'basel-tooltip'; ?>"><i class="fa fa-pinterest"></i><?php _e('Pinterest', 'xtemos') ?></a></li>
			<?php endif ?>
		</ul>

	<?php
	$output = ob_get_contents();
	ob_end_clean();

	return $output; 
}

add_shortcode( 'social_buttons', 'basel_shortcode_social' );

3. How do you want it to work? In the same window?

We can’t access your web-site and get error 403 Forbidden.

Regards