Necesito ayuda urgente para shortcode de sociallocker

  • Autor Autor descargasmega
  • Fecha de inicio Fecha de inicio
descargasmega

descargasmega

Épsilon
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Saludos.
Hoy les vengo a pedir ayuda que la necesito de urgencia.
Bueno quisisera poder colocar este shortcode al final de mi entrada osea al ultimo, pero lo quisiera hacer de forma automatica no manual ya que tengo muchos articulos en la web.

Tengo este shortcode.

[sociallocker id="3469"] Sorteo[/sociallocker]

Pero lo que pasa que no logro insertar ese shortcode en todas las entradas al final del post.

Alguine me puede ayudar con un codigo para poder colocar este shortcode al final de la entrada ya sea agregando codigo al single, al archivo funtions o en cualquier lado.

Su ayuda sera muy agradecida.

Saludos
 
Hay varias formas de hacerlo, una de ellas es la siguiente:
PHP:
echo do_shortcode('[sociallocker id="3469"] Sorteo[/sociallocker]');
Coloca ese codigo en el archivo single.php en el lugar que quieras, solo asegurate que sea antes de la etiqueta de cierre de PHP
PHP:
?>
.
 
Hay varias formas de hacerlo, una de ellas es la siguiente:
PHP:
echo do_shortcode('[sociallocker id="3469"] Sorteo[/sociallocker]');
Coloca ese codigo en el archivo single.php en el lugar que quieras, solo asegurate que sea antes de la etiqueta de cierre de PHP
PHP:
?>
.

Amigo no me sirve el codigo por mas que lo coloco no me sirve no me sale.

echo do_shortcode('[sociallocker id="3469"] Sorteo[/sociallocker]');
 
Eso funciona para imprimir los shortcodes en cualquier lugar, lo debes de estar pegando en un lugar equivocado, pega el codigo del single.php aqui o pasamelo por mp. :encouragement:
Amigo no me sirve el codigo por mas que lo coloco no me sirve no me sale.

echo do_shortcode('[sociallocker id="3469"] Sorteo[/sociallocker]');
 
Este es el codigo del single

PHP:
<?php
/**
 * The template for displaying all single posts.
 */
?>
<?php get_header(); ?>
<?php $mts_options = get_option(MTS_THEME_NAME); ?>
<div id="page" class="<?php mts_single_page_class(); ?>">
	
	<?php $header_animation = mts_get_post_header_effect(); ?>
	<?php if ( 'parallax' === $header_animation ) {?>
		<?php if (mts_get_thumbnail_url()) : ?>
			<div id="parallax" <?php echo 'style="background-image: url('.mts_get_thumbnail_url().');"'; ?>></div>
		<?php endif; ?>
	<?php } else if ( 'zoomout' === $header_animation ) {?>
		 <?php if (mts_get_thumbnail_url()) : ?>
			<div id="zoom-out-effect"><div id="zoom-out-bg" <?php echo 'style="background-image: url('.mts_get_thumbnail_url().');"'; ?>></div></div>
		<?php endif; ?>
	<?php } ?>

	<article class="<?php mts_article_class(); ?>">
		<div id="content_box" >
			<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
				<div id="post-<?php the_ID(); ?>" <?php post_class('g post'); ?>>
					<?php if ($mts_options['mts_breadcrumb'] == '1') { ?>
						<div class="breadcrumb" xmlns:v="http://rdf.data-vocabulary.org/#"><?php mts_the_breadcrumb(); ?></div>
					<?php } ?>
					<?php
					// Single post parts ordering
					if ( isset( $mts_options['mts_single_post_layout'] ) && is_array( $mts_options['mts_single_post_layout'] ) && array_key_exists( 'enabled', $mts_options['mts_single_post_layout'] ) ) {
						$single_post_parts = $mts_options['mts_single_post_layout']['enabled'];
					} else {
						$single_post_parts = array( 'content' => 'content', 'related' => 'related', 'author' => 'author' );
					}
					foreach( $single_post_parts as $part => $label ) { 
						switch ($part) {
							case 'content':
								?>
								<div class="single_post">
									<header>
										<?php if( $mts_options['mts_cat_button'] == '1' ){ ?>
											<div class="single-button">
												<div class="thecategory">
													<?php $category = get_the_category();
													if ($category) {
	  													echo '<a href="' . get_category_link( $category[0]->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category[0]->name ) . '" ' . '>' . $category[0]->name.'</a> ';
													} ?>												
												</div>
								   			</div>
								   		<?php } ?>
										<h1 class="title single-title entry-title"><?php the_title(); ?></h1>
										<?php mts_the_postinfo( 'single' ); ?>
									</header><!--.headline_area--> 

									<?php if (isset($mts_options['mts_social_button_position']) && $mts_options['mts_social_button_position'] == 'top') mts_social_buttons(); ?>
									
									<div class="post-single-content box mark-links entry-content">

										<?php if($mts_options['mts_detect_adblocker'] && $mts_options['mts_detect_adblocker_type'] == 'hide-content') {
											echo detect_adblocker_notice();
										} ?>

										<div class="<?php if($mts_options['mts_detect_adblocker'] && $mts_options['mts_detect_adblocker_type'] == 'hide-content') echo 'thecontent'; ?> clear">
											<?php if ($mts_options['mts_posttop'] && $mts_options['mts_posttop_adcode']) { ?>
												<?php $toptime = $mts_options['mts_posttop_adcode_time']; if (strcmp( date("Y-m-d", strtotime( "-$toptime day")), get_the_time("Y-m-d") ) >= 0) { ?>
													<div class="topad <?php echo $mts_options['mts_posttop_ad_position']; ?>">
														<?php echo do_shortcode($mts_options['mts_posttop_adcode']); ?>
													</div>
												<?php } ?>
											<?php } ?>
											<?php the_content(); ?>
											<?php wp_link_pages(array('before' => '<div class="pagination">', 'after' => '</div>', 'link_before'  => '<span class="currenttext">', 'link_after' => '</span>', 'next_or_number' => 'next_and_number', 'nextpagelink' => '<i class="fa fa-angle-right"></i>', 'previouspagelink' => '<i class="fa fa-angle-left"></i>', 'pagelink' => '%','echo' => 1 )); ?>
										</div>

										<?php if ($mts_options['mts_postend'] && $mts_options['mts_postend_adcode']) { ?>
											<?php $endtime = $mts_options['mts_postend_adcode_time']; if (strcmp( date("Y-m-d", strtotime( "-$endtime day")), get_the_time("Y-m-d") ) >= 0) { ?>
												<div class="bottomad <?php echo $mts_options['mts_postend_ad_position']; ?>">
													<?php echo do_shortcode($mts_options['mts_postend_adcode']); ?>
												</div>
											<?php } ?>
										<?php } ?>

										<?php if (isset($mts_options['mts_social_button_position']) && $mts_options['mts_social_button_position'] !== 'top') mts_social_buttons(); ?>

										<div class="pagination">
											<div class="nav-previous"><?php previous_post_link('%link', '<i class="fa fa-angle-left"></i> '. __( 'Prev Article', 'ad-sense' ), TRUE); ?></div>
											<div class="nav-next"><?php next_post_link('%link', __( 'Next Article', 'ad-sense' ).' <i class="fa fa-angle-right"></i>', TRUE); ?></div>
										</div>
									</div><!--.post-single-content-->
								</div><!--.single_post-->
								<?php
							break;

							case 'tags':
								?>
								<?php mts_the_tags('<div class="tags"><span class="tagtext">'.__('Tags', 'ad-sense' ).':</span>') ?>
								<?php
							break;

							case 'related':
								mts_related_posts();
							break;

							case 'author':
								?>
								<div class="postauthor">
									<h4><?php _e('About The Author', 'ad-sense' ); ?></h4>
									<?php if(function_exists('get_avatar')) { echo get_avatar( get_the_author_meta('email'), '120' );  } ?>
									<h5 class="vcard author"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" class="fn"><?php the_author_meta( 'display_name' ); ?></a></h5>
									<p><?php the_author_meta('description') ?></p>
									<?php
										$userID = $post->post_author;
										$facebook = get_the_author_meta( 'facebook', $userID );
										$twitter = get_the_author_meta( 'twitter', $userID );
										$google = get_the_author_meta( 'google', $userID );
										$pinterest = get_the_author_meta( 'pinterest', $userID );
										$stumbleupon = get_the_author_meta( 'stumbleupon', $userID );
										$linkedin = get_the_author_meta( 'linkedin', $userID );

										if(!empty($facebook) || !empty($twitter) || !empty($google) || !empty($pinterest) || !empty($stumbleupon) || !empty($linkedin)){
											echo '<div class="author-social">';
												if(!empty($facebook)){
													echo '<a href="'.$facebook.'" class="facebook"><i class="fa fa-facebook"></i></a>';
												}
												if(!empty($twitter)){
													echo '<a href="'.$twitter.'" class="twitter"><i class="fa fa-twitter"></i></a>';
												}
												if(!empty($google)){
													echo '<a href="'.$google.'" class="google-plus"><i class="fa fa-google-plus"></i></a>';
												}
												if(!empty($pinterest)){
													echo '<a href="'.$pinterest.'" class="pinterest"><i class="fa fa-pinterest"></i></a>';
												}
												if(!empty($stumbleupon)){
													echo '<a href="'.$stumbleupon.'" class="stumble"><i class="fa fa-stumbleupon"></i></a>';
												}
												if(!empty($linkedin)){
													echo '<a href="'.$linkedin.'" class="linkedin"><i class="fa fa-linkedin"></i></a>';
												}
											echo '</div>';
										}
									?>
								</div>
								<?php
							break;
						}
					}
					?>
				</div><!--.g post-->
				<?php comments_template( '', true ); ?>
			<?php endwhile; /* end loop */ ?>
		</div>
	</article>
	<?php get_sidebar(); ?>
<?php get_footer(); ?>

- - - Actualizado - - -

Eso funciona para imprimir los shortcodes en cualquier lugar, lo debes de estar pegando en un lugar equivocado, pega el codigo del single.php aqui o pasamelo por mp. :encouragement:

ESTE ES EL CODIGO DEL SINGLE

PHP:
<?php
/**
 * The template for displaying all single posts.
 */
?>
<?php get_header(); ?>
<?php $mts_options = get_option(MTS_THEME_NAME); ?>
<div id="page" class="<?php mts_single_page_class(); ?>">
	
	<?php $header_animation = mts_get_post_header_effect(); ?>
	<?php if ( 'parallax' === $header_animation ) {?>
		<?php if (mts_get_thumbnail_url()) : ?>
			<div id="parallax" <?php echo 'style="background-image: url('.mts_get_thumbnail_url().');"'; ?>></div>
		<?php endif; ?>
	<?php } else if ( 'zoomout' === $header_animation ) {?>
		 <?php if (mts_get_thumbnail_url()) : ?>
			<div id="zoom-out-effect"><div id="zoom-out-bg" <?php echo 'style="background-image: url('.mts_get_thumbnail_url().');"'; ?>></div></div>
		<?php endif; ?>
	<?php } ?>

	<article class="<?php mts_article_class(); ?>">
		<div id="content_box" >
			<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
				<div id="post-<?php the_ID(); ?>" <?php post_class('g post'); ?>>
					<?php if ($mts_options['mts_breadcrumb'] == '1') { ?>
						<div class="breadcrumb" xmlns:v="http://rdf.data-vocabulary.org/#"><?php mts_the_breadcrumb(); ?></div>
					<?php } ?>
					<?php
					// Single post parts ordering
					if ( isset( $mts_options['mts_single_post_layout'] ) && is_array( $mts_options['mts_single_post_layout'] ) && array_key_exists( 'enabled', $mts_options['mts_single_post_layout'] ) ) {
						$single_post_parts = $mts_options['mts_single_post_layout']['enabled'];
					} else {
						$single_post_parts = array( 'content' => 'content', 'related' => 'related', 'author' => 'author' );
					}
					foreach( $single_post_parts as $part => $label ) { 
						switch ($part) {
							case 'content':
								?>
								<div class="single_post">
									<header>
										<?php if( $mts_options['mts_cat_button'] == '1' ){ ?>
											<div class="single-button">
												<div class="thecategory">
													<?php $category = get_the_category();
													if ($category) {
	  													echo '<a href="' . get_category_link( $category[0]->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category[0]->name ) . '" ' . '>' . $category[0]->name.'</a> ';
													} ?>												
												</div>
								   			</div>
								   		<?php } ?>
										<h1 class="title single-title entry-title"><?php the_title(); ?></h1>
										<?php mts_the_postinfo( 'single' ); ?>
									</header><!--.headline_area--> 

									<?php if (isset($mts_options['mts_social_button_position']) && $mts_options['mts_social_button_position'] == 'top') mts_social_buttons(); ?>
									
									<div class="post-single-content box mark-links entry-content">

										<?php if($mts_options['mts_detect_adblocker'] && $mts_options['mts_detect_adblocker_type'] == 'hide-content') {
											echo detect_adblocker_notice();
										} ?>

										<div class="<?php if($mts_options['mts_detect_adblocker'] && $mts_options['mts_detect_adblocker_type'] == 'hide-content') echo 'thecontent'; ?> clear">
											<?php if ($mts_options['mts_posttop'] && $mts_options['mts_posttop_adcode']) { ?>
												<?php $toptime = $mts_options['mts_posttop_adcode_time']; if (strcmp( date("Y-m-d", strtotime( "-$toptime day")), get_the_time("Y-m-d") ) >= 0) { ?>
													<div class="topad <?php echo $mts_options['mts_posttop_ad_position']; ?>">
														<?php echo do_shortcode($mts_options['mts_posttop_adcode']); ?>
													</div>
												<?php } ?>
											<?php } ?>
											<?php the_content(); ?>
											<?php wp_link_pages(array('before' => '<div class="pagination">', 'after' => '</div>', 'link_before'  => '<span class="currenttext">', 'link_after' => '</span>', 'next_or_number' => 'next_and_number', 'nextpagelink' => '<i class="fa fa-angle-right"></i>', 'previouspagelink' => '<i class="fa fa-angle-left"></i>', 'pagelink' => '%','echo' => 1 )); ?>
										</div>

										<?php if ($mts_options['mts_postend'] && $mts_options['mts_postend_adcode']) { ?>
											<?php $endtime = $mts_options['mts_postend_adcode_time']; if (strcmp( date("Y-m-d", strtotime( "-$endtime day")), get_the_time("Y-m-d") ) >= 0) { ?>
												<div class="bottomad <?php echo $mts_options['mts_postend_ad_position']; ?>">
													<?php echo do_shortcode($mts_options['mts_postend_adcode']); ?>
												</div>
											<?php } ?>
										<?php } ?>

										<?php if (isset($mts_options['mts_social_button_position']) && $mts_options['mts_social_button_position'] !== 'top') mts_social_buttons(); ?>

										<div class="pagination">
											<div class="nav-previous"><?php previous_post_link('%link', '<i class="fa fa-angle-left"></i> '. __( 'Prev Article', 'ad-sense' ), TRUE); ?></div>
											<div class="nav-next"><?php next_post_link('%link', __( 'Next Article', 'ad-sense' ).' <i class="fa fa-angle-right"></i>', TRUE); ?></div>
										</div>
									</div><!--.post-single-content-->
								</div><!--.single_post-->
								<?php
							break;

							case 'tags':
								?>
								<?php mts_the_tags('<div class="tags"><span class="tagtext">'.__('Tags', 'ad-sense' ).':</span>') ?>
								<?php
							break;

							case 'related':
								mts_related_posts();
							break;

							case 'author':
								?>
								<div class="postauthor">
									<h4><?php _e('About The Author', 'ad-sense' ); ?></h4>
									<?php if(function_exists('get_avatar')) { echo get_avatar( get_the_author_meta('email'), '120' );  } ?>
									<h5 class="vcard author"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" class="fn"><?php the_author_meta( 'display_name' ); ?></a></h5>
									<p><?php the_author_meta('description') ?></p>
									<?php
										$userID = $post->post_author;
										$facebook = get_the_author_meta( 'facebook', $userID );
										$twitter = get_the_author_meta( 'twitter', $userID );
										$google = get_the_author_meta( 'google', $userID );
										$pinterest = get_the_author_meta( 'pinterest', $userID );
										$stumbleupon = get_the_author_meta( 'stumbleupon', $userID );
										$linkedin = get_the_author_meta( 'linkedin', $userID );

										if(!empty($facebook) || !empty($twitter) || !empty($google) || !empty($pinterest) || !empty($stumbleupon) || !empty($linkedin)){
											echo '<div class="author-social">';
												if(!empty($facebook)){
													echo '<a href="'.$facebook.'" class="facebook"><i class="fa fa-facebook"></i></a>';
												}
												if(!empty($twitter)){
													echo '<a href="'.$twitter.'" class="twitter"><i class="fa fa-twitter"></i></a>';
												}
												if(!empty($google)){
													echo '<a href="'.$google.'" class="google-plus"><i class="fa fa-google-plus"></i></a>';
												}
												if(!empty($pinterest)){
													echo '<a href="'.$pinterest.'" class="pinterest"><i class="fa fa-pinterest"></i></a>';
												}
												if(!empty($stumbleupon)){
													echo '<a href="'.$stumbleupon.'" class="stumble"><i class="fa fa-stumbleupon"></i></a>';
												}
												if(!empty($linkedin)){
													echo '<a href="'.$linkedin.'" class="linkedin"><i class="fa fa-linkedin"></i></a>';
												}
											echo '</div>';
										}
									?>
								</div>
								<?php
							break;
						}
					}
					?>
				</div><!--.g post-->
				<?php comments_template( '', true ); ?>
			<?php endwhile; /* end loop */ ?>
		</div>
	</article>
	<?php get_sidebar(); ?>
<?php get_footer(); ?>
 
Intenta con esto:
PHP:
<?php
/**
 * The template for displaying all single posts.
 */
?>
<?php get_header(); ?>
<?php $mts_options = get_option(MTS_THEME_NAME); ?>
<div id="page" class="<?php mts_single_page_class(); ?>">
    
    <?php $header_animation = mts_get_post_header_effect(); ?>
    <?php if ( 'parallax' === $header_animation ) {?>
        <?php if (mts_get_thumbnail_url()) : ?>
            <div id="parallax" <?php echo 'style="background-image: url('.mts_get_thumbnail_url().');"'; ?>></div>
        <?php endif; ?>
    <?php } else if ( 'zoomout' === $header_animation ) {?>
         <?php if (mts_get_thumbnail_url()) : ?>
            <div id="zoom-out-effect"><div id="zoom-out-bg" <?php echo 'style="background-image: url('.mts_get_thumbnail_url().');"'; ?>></div></div>
        <?php endif; ?>
    <?php } ?>

    <article class="<?php mts_article_class(); ?>">
        <div id="content_box" >
            <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
                <div id="post-<?php the_ID(); ?>" <?php post_class('g post'); ?>>
                    <?php if ($mts_options['mts_breadcrumb'] == '1') { ?>
                        <div class="breadcrumb" xmlns:v="http://rdf.data-vocabulary.org/#"><?php mts_the_breadcrumb(); ?></div>
                    <?php } ?>
                    <?php
                    // Single post parts ordering
                    if ( isset( $mts_options['mts_single_post_layout'] ) && is_array( $mts_options['mts_single_post_layout'] ) && array_key_exists( 'enabled', $mts_options['mts_single_post_layout'] ) ) {
                        $single_post_parts = $mts_options['mts_single_post_layout']['enabled'];
                    } else {
                        $single_post_parts = array( 'content' => 'content', 'related' => 'related', 'author' => 'author' );
                    }
                    foreach( $single_post_parts as $part => $label ) { 
                        switch ($part) {
                            case 'content':
                                ?>
                                <div class="single_post">
                                    <header>
                                        <?php if( $mts_options['mts_cat_button'] == '1' ){ ?>
                                            <div class="single-button">
                                                <div class="thecategory">
                                                    <?php $category = get_the_category();
                                                    if ($category) {
                                                          echo '<a href="' . get_category_link( $category[0]->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category[0]->name ) . '" ' . '>' . $category[0]->name.'</a> ';
                                                    } ?>                                                
                                                </div>
                                               </div>
                                           <?php } ?>
                                        <h1 class="title single-title entry-title"><?php the_title(); ?></h1>
                                        <?php mts_the_postinfo( 'single' ); ?>
                                    </header><!--.headline_area--> 

                                    <?php if (isset($mts_options['mts_social_button_position']) && $mts_options['mts_social_button_position'] == 'top') mts_social_buttons(); ?>
                                    
                                    <div class="post-single-content box mark-links entry-content">

                                        <?php if($mts_options['mts_detect_adblocker'] && $mts_options['mts_detect_adblocker_type'] == 'hide-content') {
                                            echo detect_adblocker_notice();
                                        } ?>

                                        <div class="<?php if($mts_options['mts_detect_adblocker'] && $mts_options['mts_detect_adblocker_type'] == 'hide-content') echo 'thecontent'; ?> clear">
                                            <?php if ($mts_options['mts_posttop'] && $mts_options['mts_posttop_adcode']) { ?>
                                                <?php $toptime = $mts_options['mts_posttop_adcode_time']; if (strcmp( date("Y-m-d", strtotime( "-$toptime day")), get_the_time("Y-m-d") ) >= 0) { ?>
                                                    <div class="topad <?php echo $mts_options['mts_posttop_ad_position']; ?>">
                                                        <?php echo do_shortcode($mts_options['mts_posttop_adcode']); ?>
                                                    </div>
                                                <?php } ?>
                                            <?php } ?>
                                            <?php the_content(); ?>
                                            <?php echo do_shortcode('[sociallocker id="3469"]Sorteo[/sociallocker]'); ?> 
                                            <?php wp_link_pages(array('before' => '<div class="pagination">', 'after' => '</div>', 'link_before'  => '<span class="currenttext">', 'link_after' => '</span>', 'next_or_number' => 'next_and_number', 'nextpagelink' => '<i class="fa fa-angle-right"></i>', 'previouspagelink' => '<i class="fa fa-angle-left"></i>', 'pagelink' => '%','echo' => 1 )); ?>
                                        </div>

                                        <?php if ($mts_options['mts_postend'] && $mts_options['mts_postend_adcode']) { ?>
                                            <?php $endtime = $mts_options['mts_postend_adcode_time']; if (strcmp( date("Y-m-d", strtotime( "-$endtime day")), get_the_time("Y-m-d") ) >= 0) { ?>
                                                <div class="bottomad <?php echo $mts_options['mts_postend_ad_position']; ?>">
                                                    <?php echo do_shortcode($mts_options['mts_postend_adcode']); ?>
                                                </div>
                                            <?php } ?>
                                        <?php } ?>

                                        <?php if (isset($mts_options['mts_social_button_position']) && $mts_options['mts_social_button_position'] !== 'top') mts_social_buttons(); ?>

                                        <div class="pagination">
                                            <div class="nav-previous"><?php previous_post_link('%link', '<i class="fa fa-angle-left"></i> '. __( 'Prev Article', 'ad-sense' ), TRUE); ?></div>
                                            <div class="nav-next"><?php next_post_link('%link', __( 'Next Article', 'ad-sense' ).' <i class="fa fa-angle-right"></i>', TRUE); ?></div>
                                        </div>
                                    </div><!--.post-single-content-->
                                </div><!--.single_post-->
                                <?php
                            break;

                            case 'tags':
                                ?>
                                <?php mts_the_tags('<div class="tags"><span class="tagtext">'.__('Tags', 'ad-sense' ).':</span>') ?>
                                <?php
                            break;

                            case 'related':
                                mts_related_posts();
                            break;

                            case 'author':
                                ?>
                                <div class="postauthor">
                                    <h4><?php _e('About The Author', 'ad-sense' ); ?></h4>
                                    <?php if(function_exists('get_avatar')) { echo get_avatar( get_the_author_meta('email'), '120' );  } ?>
                                    <h5 class="vcard author"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" class="fn"><?php the_author_meta( 'display_name' ); ?></a></h5>
                                    <p><?php the_author_meta('description') ?></p>
                                    <?php
                                        $userID = $post->post_author;
                                        $facebook = get_the_author_meta( 'facebook', $userID );
                                        $twitter = get_the_author_meta( 'twitter', $userID );
                                        $google = get_the_author_meta( 'google', $userID );
                                        $pinterest = get_the_author_meta( 'pinterest', $userID );
                                        $stumbleupon = get_the_author_meta( 'stumbleupon', $userID );
                                        $linkedin = get_the_author_meta( 'linkedin', $userID );

                                        if(!empty($facebook) || !empty($twitter) || !empty($google) || !empty($pinterest) || !empty($stumbleupon) || !empty($linkedin)){
                                            echo '<div class="author-social">';
                                                if(!empty($facebook)){
                                                    echo '<a href="'.$facebook.'" class="facebook"><i class="fa fa-facebook"></i></a>';
                                                }
                                                if(!empty($twitter)){
                                                    echo '<a href="'.$twitter.'" class="twitter"><i class="fa fa-twitter"></i></a>';
                                                }
                                                if(!empty($google)){
                                                    echo '<a href="'.$google.'" class="google-plus"><i class="fa fa-google-plus"></i></a>';
                                                }
                                                if(!empty($pinterest)){
                                                    echo '<a href="'.$pinterest.'" class="pinterest"><i class="fa fa-pinterest"></i></a>';
                                                }
                                                if(!empty($stumbleupon)){
                                                    echo '<a href="'.$stumbleupon.'" class="stumble"><i class="fa fa-stumbleupon"></i></a>';
                                                }
                                                if(!empty($linkedin)){
                                                    echo '<a href="'.$linkedin.'" class="linkedin"><i class="fa fa-linkedin"></i></a>';
                                                }
                                            echo '</div>';
                                        }
                                    ?>
                                </div>
                                <?php
                            break;
                        }
                    }
                    ?>
                </div><!--.g post-->
                <?php comments_template( '', true ); ?>
            <?php endwhile; /* end loop */ ?>
        </div>
    </article>
    <?php get_sidebar(); ?>
<?php get_footer(); ?>
Este es el codigo del single
 
Social Locker (si es el plugin de CodeCanyon) tiene una opción en las configuración del shortcode que te permite insertarlos en todas las páginas o entradas automáticamente... Además puedes pedir asistencia o soporte al desarrollador. Son rebuenos!

Saludos,
 
Social Locker (si es el plugin de CodeCanyon) tiene una opción en las configuración del shortcode que te permite insertarlos en todas las páginas o entradas automáticamente... Además puedes pedir asistencia o soporte al desarrollador. Son rebuenos!

Saludos,

Bueno solo tiene una opcion.
Me da para colocarlos por parrafos pero cada articulo tiene diferentes parrafos y yo lo que quiero es colocarlos al ultimo de cada entrada amigo.

Claro tambien me da para colocarlo por css pero eso no entiendo nada.

CSS selectors allow accurately choose which content will be locked by usign CSS classes or IDs of elements placed on pages. If you don't know what is it, please don't use it.
For example, "#somecontent .my-class, .my-another-class"

- - - Actualizado - - -

Intenta con esto:
PHP:
<?php
/**
 * The template for displaying all single posts.
 */
?>
<?php get_header(); ?>
<?php $mts_options = get_option(MTS_THEME_NAME); ?>
<div id="page" class="<?php mts_single_page_class(); ?>">
    
    <?php $header_animation = mts_get_post_header_effect(); ?>
    <?php if ( 'parallax' === $header_animation ) {?>
        <?php if (mts_get_thumbnail_url()) : ?>
            <div id="parallax" <?php echo 'style="background-image: url('.mts_get_thumbnail_url().');"'; ?>></div>
        <?php endif; ?>
    <?php } else if ( 'zoomout' === $header_animation ) {?>
         <?php if (mts_get_thumbnail_url()) : ?>
            <div id="zoom-out-effect"><div id="zoom-out-bg" <?php echo 'style="background-image: url('.mts_get_thumbnail_url().');"'; ?>></div></div>
        <?php endif; ?>
    <?php } ?>

    <article class="<?php mts_article_class(); ?>">
        <div id="content_box" >
            <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
                <div id="post-<?php the_ID(); ?>" <?php post_class('g post'); ?>>
                    <?php if ($mts_options['mts_breadcrumb'] == '1') { ?>
                        <div class="breadcrumb" xmlns:v="http://rdf.data-vocabulary.org/#"><?php mts_the_breadcrumb(); ?></div>
                    <?php } ?>
                    <?php
                    // Single post parts ordering
                    if ( isset( $mts_options['mts_single_post_layout'] ) && is_array( $mts_options['mts_single_post_layout'] ) && array_key_exists( 'enabled', $mts_options['mts_single_post_layout'] ) ) {
                        $single_post_parts = $mts_options['mts_single_post_layout']['enabled'];
                    } else {
                        $single_post_parts = array( 'content' => 'content', 'related' => 'related', 'author' => 'author' );
                    }
                    foreach( $single_post_parts as $part => $label ) { 
                        switch ($part) {
                            case 'content':
                                ?>
                                <div class="single_post">
                                    <header>
                                        <?php if( $mts_options['mts_cat_button'] == '1' ){ ?>
                                            <div class="single-button">
                                                <div class="thecategory">
                                                    <?php $category = get_the_category();
                                                    if ($category) {
                                                          echo '<a href="' . get_category_link( $category[0]->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category[0]->name ) . '" ' . '>' . $category[0]->name.'</a> ';
                                                    } ?>                                                
                                                </div>
                                               </div>
                                           <?php } ?>
                                        <h1 class="title single-title entry-title"><?php the_title(); ?></h1>
                                        <?php mts_the_postinfo( 'single' ); ?>
                                    </header><!--.headline_area--> 

                                    <?php if (isset($mts_options['mts_social_button_position']) && $mts_options['mts_social_button_position'] == 'top') mts_social_buttons(); ?>
                                    
                                    <div class="post-single-content box mark-links entry-content">

                                        <?php if($mts_options['mts_detect_adblocker'] && $mts_options['mts_detect_adblocker_type'] == 'hide-content') {
                                            echo detect_adblocker_notice();
                                        } ?>

                                        <div class="<?php if($mts_options['mts_detect_adblocker'] && $mts_options['mts_detect_adblocker_type'] == 'hide-content') echo 'thecontent'; ?> clear">
                                            <?php if ($mts_options['mts_posttop'] && $mts_options['mts_posttop_adcode']) { ?>
                                                <?php $toptime = $mts_options['mts_posttop_adcode_time']; if (strcmp( date("Y-m-d", strtotime( "-$toptime day")), get_the_time("Y-m-d") ) >= 0) { ?>
                                                    <div class="topad <?php echo $mts_options['mts_posttop_ad_position']; ?>">
                                                        <?php echo do_shortcode($mts_options['mts_posttop_adcode']); ?>
                                                    </div>
                                                <?php } ?>
                                            <?php } ?>
                                            <?php the_content(); ?>
                                            <?php echo do_shortcode('[sociallocker id="3469"]Sorteo[/sociallocker]'); ?> 
                                            <?php wp_link_pages(array('before' => '<div class="pagination">', 'after' => '</div>', 'link_before'  => '<span class="currenttext">', 'link_after' => '</span>', 'next_or_number' => 'next_and_number', 'nextpagelink' => '<i class="fa fa-angle-right"></i>', 'previouspagelink' => '<i class="fa fa-angle-left"></i>', 'pagelink' => '%','echo' => 1 )); ?>
                                        </div>

                                        <?php if ($mts_options['mts_postend'] && $mts_options['mts_postend_adcode']) { ?>
                                            <?php $endtime = $mts_options['mts_postend_adcode_time']; if (strcmp( date("Y-m-d", strtotime( "-$endtime day")), get_the_time("Y-m-d") ) >= 0) { ?>
                                                <div class="bottomad <?php echo $mts_options['mts_postend_ad_position']; ?>">
                                                    <?php echo do_shortcode($mts_options['mts_postend_adcode']); ?>
                                                </div>
                                            <?php } ?>
                                        <?php } ?>

                                        <?php if (isset($mts_options['mts_social_button_position']) && $mts_options['mts_social_button_position'] !== 'top') mts_social_buttons(); ?>

                                        <div class="pagination">
                                            <div class="nav-previous"><?php previous_post_link('%link', '<i class="fa fa-angle-left"></i> '. __( 'Prev Article', 'ad-sense' ), TRUE); ?></div>
                                            <div class="nav-next"><?php next_post_link('%link', __( 'Next Article', 'ad-sense' ).' <i class="fa fa-angle-right"></i>', TRUE); ?></div>
                                        </div>
                                    </div><!--.post-single-content-->
                                </div><!--.single_post-->
                                <?php
                            break;

                            case 'tags':
                                ?>
                                <?php mts_the_tags('<div class="tags"><span class="tagtext">'.__('Tags', 'ad-sense' ).':</span>') ?>
                                <?php
                            break;

                            case 'related':
                                mts_related_posts();
                            break;

                            case 'author':
                                ?>
                                <div class="postauthor">
                                    <h4><?php _e('About The Author', 'ad-sense' ); ?></h4>
                                    <?php if(function_exists('get_avatar')) { echo get_avatar( get_the_author_meta('email'), '120' );  } ?>
                                    <h5 class="vcard author"><a rel="nofollow" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" class="fn"><?php the_author_meta( 'display_name' ); ?></a></h5>
                                    <p><?php the_author_meta('description') ?></p>
                                    <?php
                                        $userID = $post->post_author;
                                        $facebook = get_the_author_meta( 'facebook', $userID );
                                        $twitter = get_the_author_meta( 'twitter', $userID );
                                        $google = get_the_author_meta( 'google', $userID );
                                        $pinterest = get_the_author_meta( 'pinterest', $userID );
                                        $stumbleupon = get_the_author_meta( 'stumbleupon', $userID );
                                        $linkedin = get_the_author_meta( 'linkedin', $userID );

                                        if(!empty($facebook) || !empty($twitter) || !empty($google) || !empty($pinterest) || !empty($stumbleupon) || !empty($linkedin)){
                                            echo '<div class="author-social">';
                                                if(!empty($facebook)){
                                                    echo '<a href="'.$facebook.'" class="facebook"><i class="fa fa-facebook"></i></a>';
                                                }
                                                if(!empty($twitter)){
                                                    echo '<a href="'.$twitter.'" class="twitter"><i class="fa fa-twitter"></i></a>';
                                                }
                                                if(!empty($google)){
                                                    echo '<a href="'.$google.'" class="google-plus"><i class="fa fa-google-plus"></i></a>';
                                                }
                                                if(!empty($pinterest)){
                                                    echo '<a href="'.$pinterest.'" class="pinterest"><i class="fa fa-pinterest"></i></a>';
                                                }
                                                if(!empty($stumbleupon)){
                                                    echo '<a href="'.$stumbleupon.'" class="stumble"><i class="fa fa-stumbleupon"></i></a>';
                                                }
                                                if(!empty($linkedin)){
                                                    echo '<a href="'.$linkedin.'" class="linkedin"><i class="fa fa-linkedin"></i></a>';
                                                }
                                            echo '</div>';
                                        }
                                    ?>
                                </div>
                                <?php
                            break;
                        }
                    }
                    ?>
                </div><!--.g post-->
                <?php comments_template( '', true ); ?>
            <?php endwhile; /* end loop */ ?>
        </div>
    </article>
    <?php get_sidebar(); ?>
<?php get_footer(); ?>


Amigo lo he probado y no me sale sabes colocarlo por css.
Asi me da una opcion el mismo plugin de donde colocarlo

CSS selectors allow accurately choose which content will be locked by usign CSS classes or IDs of elements placed on pages. If you don't know what is it, please don't use it.
For example, "#somecontent .my-class, .my-another-class"
 
Bueno solo tiene una opcion.
Me da para colocarlos por parrafos pero cada articulo tiene diferentes parrafos y yo lo que quiero es colocarlos al ultimo de cada entrada amigo.

Claro tambien me da para colocarlo por css pero eso no entiendo nada.

CSS selectors allow accurately choose which content will be locked by usign CSS classes or IDs of elements placed on pages. If you don't know what is it, please don't use it.
For example, "#somecontent .my-class, .my-another-class"

- - - Actualizado - - -




Amigo lo he probado y no me sale sabes colocarlo por css.
Asi me da una opcion el mismo plugin de donde colocarlo

CSS selectors allow accurately choose which content will be locked by usign CSS classes or IDs of elements placed on pages. If you don't know what is it, please don't use it.
For example, "#somecontent .my-class, .my-another-class"

Te dice que puedes colocar el bloquear utilizando una clase. La clases se utilizan en CSS para identificar un elemento. Porque no pides ayudar al soporte técnico?
 
Última edición por un moderador:
Te dice que puedes colocar el bloquear utilizando una clase. La clases se utilizan en CSS para identificar un elemento. Porque no pides ayudar al soporte técnico?

Es el plugin de MyThemeShop pero nose como contactarme.
 

Temas similares

Atrás
Arriba