← WordPress

Colocar os ícones do plugin de partilha nas redes sociais acima do Related Posts

Lida 7693 vezes

Offline

Mister_Magoo 
Membro
Mensagens 594 Gostos 38
Troféus totais: 29
Trófeus: (Ver todos)
Nineth year Anniversary Eighth year Anniversary Quick Poster Signature Level 5 Search Windows User Super Combination Combination Topic Starter

Precisando de um help quem poder ajudar agradeço.

Uso o plugin ShareThis para criar os ícones de compartilhamento nas redes sociais, porém ele fica muito abaixo dos artigos.

É possível posicionar para ficar abaixo dos artigos?

Atualmente assim que acaba o artigo vem "Confira esses artigos" com 6 blocos e logo abaixo os ícones de compartilhamento...
Offline

bfms 
Equipa
Mensagens 1769 Gostos 40
Feedback +1

Troféus totais: 35
Trófeus: (Ver todos)
Search Level 6 Apple User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

Utilizas o plugin em que plataforma?

Pretendes colocar os ícones de partilha antes dos "Confira esses artigos", é isso? Envia o link do teu site e assim fica mais fácil o pessoal ajudar-te ;)

Offline

Mister_Magoo 
Membro
Mensagens 594 Gostos 38
Troféus totais: 29
Trófeus: (Ver todos)
Nineth year Anniversary Eighth year Anniversary Quick Poster Signature Level 5 Search Windows User Super Combination Combination Topic Starter

Uso Wodpress.

Para ter ideia http://blogmarketingonline.com.br/como-ganhar-dinheiro-online-de-verdade/

Ficar abaixo do artigo ou acima do Confira esses artigos
Offline

bfms 
Equipa
Mensagens 1769 Gostos 40
Feedback +1

Troféus totais: 35
Trófeus: (Ver todos)
Search Level 6 Apple User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

Para os ícones ficarem no final do conteúdo do artigo e acima do "Confira esses artigos", experimenta fazer o seguinte:

- No plugin Related Posts que utilizas, vá às definições e terás que desativar esta opção:
Auto Insert Related Posts (or add <? php wp_related_posts() ? > to your single post template)

- Depois vais ao menu de Apresentação > Editor e selecionas o ficheiro do single.php ou content-single.php. Encontrarás algo como
Código: [Seleccione]
<?php the_content(); ?>
Abaixo dessa linha, colas o código do plugin Related Posts:
Código: [Seleccione]
<?php wp_related_posts()?>

Guarda as alterações e voilá ;) Experimenta e depois dá feedback

Offline

Mister_Magoo 
Membro
Mensagens 594 Gostos 38
Troféus totais: 29
Trófeus: (Ver todos)
Nineth year Anniversary Eighth year Anniversary Quick Poster Signature Level 5 Search Windows User Super Combination Combination Topic Starter

Desculpa pela demora na resposta.

Entrei nas configurações (editar) do plugin Related Posts e pediu para desabilitar a opção "Auto Insert Related Posts (or add <? php wp_related_posts() ? > to your single post template)", porém somente achei

wordpress-23-related-posts-plugin/versions.php - wp_rp_auto auto insert related posts to single post pages

wordpress-23-related-posts-plugin/views/settings.php - <?php _e("Auto Insert Related Posts",'wp_related_posts');?>
Offline

bfms 
Equipa
Mensagens 1769 Gostos 40
Feedback +1

Troféus totais: 35
Trófeus: (Ver todos)
Search Level 6 Apple User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

Desculpa pela demora na resposta.

Entrei nas configurações (editar) do plugin Related Posts e pediu para desabilitar a opção "Auto Insert Related Posts (or add <? php wp_related_posts() ? > to your single post template)", porém somente achei

wordpress-23-related-posts-plugin/versions.php - wp_rp_auto auto insert related posts to single post pages

wordpress-23-related-posts-plugin/views/settings.php - <?php _e("Auto Insert Related Posts",'wp_related_posts');?>

Quando referi ir às definições do plugin não me referia a editá-lo :)

No menu Ferramentas ou Opções do WordPress deves ter lá as opções do plugin Related Posts (onde configuras o número de posts a mostrar, estilo, etc). É nessa página que tens o Advanced Options e a opção que referi. Verifica ;)
Offline

Mister_Magoo 
Membro
Mensagens 594 Gostos 38
Troféus totais: 29
Trófeus: (Ver todos)
Nineth year Anniversary Eighth year Anniversary Quick Poster Signature Level 5 Search Windows User Super Combination Combination Topic Starter

Hum ok fui no lugar errado desculpa.

Desabilitei a opção Auto Insert Related Posts (or add <? php wp_related_posts() ? > to your single post template).

No meu template não tenho content-single.php somente single.php.

Procurei no single.php e não tem <?php the_content(); ?>.

Meu código.

 <div id="main">
   
        <?php $theme->hook('main_before'); ?>
   
        <div id="content">
           
            <?php $theme->hook('content_before'); ?>

 <?php
                if (have_posts()) : while (have_posts()) : the_post();
                    /**
                     * Find the post formatting for the single post (full post view) in the post-single.php file
                     */
                    get_template_part('post', 'single');
                endwhile;
               
                else :
                    get_template_part('post', 'noresults');
                endif;
            ?>

           
            <?php $theme->hook('content_after'); ?>

       
        </div><!-- #content -->

   
        <?php get_sidebars(); ?>
       
        <?php $theme->hook('main_after'); ?>

       
    </div><!-- #main -->
   
<?php get_footer(); ?>
Offline

bfms 
Equipa
Mensagens 1769 Gostos 40
Feedback +1

Troféus totais: 35
Trófeus: (Ver todos)
Search Level 6 Apple User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

Neste caso o ficheiro a procurar será o post-single.php
Offline

Mister_Magoo 
Membro
Mensagens 594 Gostos 38
Troféus totais: 29
Trófeus: (Ver todos)
Nineth year Anniversary Eighth year Anniversary Quick Poster Signature Level 5 Search Windows User Super Combination Combination Topic Starter

Em post-single.php também não achei <?php the_content(); ?>

Meu post-single.php

<?php global $theme; ?>

    <div <?php post_class('post post-single clearfix'); ?> id="post-<?php the_ID(); ?>">
   
        <h2 class="title"><?php the_title(); ?></h2>
       
        <div class="postmeta-primary">
   
            <span class="meta_date"><?php echo get_the_date(); ?></span>
           &nbsp; <span class="meta_categories"><?php the_category(', '); ?></span>
   
                <?php if(comments_open( get_the_ID() ))  {
                    ?> &nbsp; <span class="meta_comments"><?php comments_popup_link( __( 'No comments', 'themater' ), __( '1 Comment', 'themater' ), __( '% Comments', 'themater' ) ); ?></span><?php
                }
               
                if(is_user_logged_in())  {
                    ?> &nbsp; <span class="meta_edit"><?php edit_post_link(); ?></span><?php
                } ?>
        </div>

       
        <div class="entry clearfix">
           
            <?php
                if(has_post_thumbnail())  {
                    the_post_thumbnail(
                        array($theme->get_option('featured_image_width_single'), $theme->get_option('featured_image_height_single')),
                        array("class" => $theme->get_option('featured_image_position_single') . " featured_image")
                    );
                }
            ?>
           
            <?php
                the_content('');
                wp_link_pages( array( 'before' => '<p><strong>' . __( 'Pages:', 'themater' ) . '</strong>', 'after' => '</p>' ) );
            ?>
   
        </div>

 <?php if(get_the_tags()) {
                ?><div class="postmeta-secondary"><span class="meta_tags"><?php the_tags('', ', ', ''); ?></span></div><?php
            }
        ?>
       
   
    </div><!-- Post ID <?php the_ID(); ?> -->
   
    <?php
        if(comments_open( get_the_ID() ))  {
            comments_template('', true);
        }
    ?>
Offline

bfms 
Equipa
Mensagens 1769 Gostos 40
Feedback +1

Troféus totais: 35
Trófeus: (Ver todos)
Search Level 6 Apple User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

Em post-single.php também não achei <?php the_content(); ?>

Meu post-single.php

<?php global $theme; ?>
    <div <?php post_class('post post-single clearfix'); ?> id="post-<?php the_ID(); ?>">
        <h2 class="title"><?php the_title(); ?></h2>
        <div class="postmeta-primary">
            <span class="meta_date"><?php echo get_the_date(); ?></span>
           &nbsp; <span class="meta_categories"><?php the_category(', '); ?></span>
   
                <?php if(comments_open( get_the_ID() ))  {
                    ?> &nbsp; <span class="meta_comments"><?php comments_popup_link( __( 'No comments', 'themater' ), __( '1 Comment', 'themater' ), __( '% Comments', 'themater' ) ); ?></span><?php
                }
               
                if(is_user_logged_in())  {
                    ?> &nbsp; <span class="meta_edit"><?php edit_post_link(); ?></span><?php
                } ?>
        </div>

       
        <div class="entry clearfix">
           
            <?php
                if(has_post_thumbnail())  {
                    the_post_thumbnail(
                        array($theme->get_option('featured_image_width_single'), $theme->get_option('featured_image_height_single')),
                        array("class" => $theme->get_option('featured_image_position_single') . " featured_image")
                    );
                }
            ?>
           
            <?php
                the_content('');
                wp_link_pages( array( 'before' => '<p><strong>' . __( 'Pages:', 'themater' ) . '</strong>', 'after' => '</p>' ) );
            ?>
   
        </div>

 <?php if(get_the_tags()) {
                ?><div class="postmeta-secondary"><span class="meta_tags"><?php the_tags('', ', ', ''); ?></span></div><?php
            }
        ?>
       
   
    </div><!-- Post ID <?php the_ID(); ?> -->
   
    <?php
        if(comments_open( get_the_ID() ))  {
            comments_template('', true);
        }
    ?>

Coloquei no código acima (a vermelho) onde está o the_content();

Abaixo dessa linha acrescentas então o código

Código: [Seleccione]
wp_related_posts();
Offline

Mister_Magoo 
Membro
Mensagens 594 Gostos 38
Troféus totais: 29
Trófeus: (Ver todos)
Nineth year Anniversary Eighth year Anniversary Quick Poster Signature Level 5 Search Windows User Super Combination Combination Topic Starter

Nossa o falta de atenção da minha parte realmente tem essa linha.

Perfeito agora super, mega, obrigado.
Offline

bfms 
Equipa
Mensagens 1769 Gostos 40
Feedback +1

Troféus totais: 35
Trófeus: (Ver todos)
Search Level 6 Apple User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

Nossa o falta de atenção da minha parte realmente tem essa linha.

Perfeito agora super, mega, obrigado.

Boa! Ainda bem que funcionou :)
Alterei o título do tópico, assim torna-se mais fácil ou útil para quem tiver a mesma questão.
Offline

Mister_Magoo 
Membro
Mensagens 594 Gostos 38
Troféus totais: 29
Trófeus: (Ver todos)
Nineth year Anniversary Eighth year Anniversary Quick Poster Signature Level 5 Search Windows User Super Combination Combination Topic Starter

Voltando mais uma vez pedindo um help.

Achei interessante a forma que o megacubo tem pedindo  para divulgar nas redes sociais.

Espalhe para seus amigos e nos ajude a crescer ↓↓
http://megacubo.net/?locale=pt

Tentei adicionar

<?php
                the_content('');

Espalhe para seus amigos e nos ajude a crescer ↓↓
wp_related_posts();

Porém acusa o seguinte erro.

Parse error: syntax error, unexpected T_STRING in /home/harmo329/public_html/blogmarketingonline.com.br/wp-content/themes/Sintea/post-single.php on line 36