Не могу добавить “Мне нравиться”

Всем добрый день!
Я себе вот создал блог на ВордПресс, и хочется зделать в каждой статье кнопку "Мне нравится" от Фейсбук, но проблема состоит в том что везде написано что код надо вставлять в файлике single.php после <?php the_content(); ?> но у меня там такого нет, а вот что есть :

<?php get_header(); ?>
<div class="art-content-layout">
    <div class="art-content-layout-row">
        <div class="art-layout-cell art-content">
            <?php get_sidebar('top');  ?>

            <?php 
                if (have_posts()){
                    /* Display navigation to next/previous posts when applicable */
                    if (theme_get_option('theme_top_single_navigation')) {
                        theme_page_navigation(
                            array(
                                'next_link' => theme_get_previous_post_link('&laquo; %link'),
                                'prev_link' => theme_get_next_post_link('%link &raquo;')
                                
                            )
                        );
                    }
                    
                    while (have_posts())  
                    {
                        the_post();
                        get_template_part('content', 'single');
                        comments_template();
                    }
                    
                    /* Display navigation to next/previous posts when applicable */
                    if (theme_get_option('theme_bottom_single_navigation')) {
                        theme_page_navigation(
                            array(
                                'next_link' => theme_get_previous_post_link('&laquo; %link'),
                                'prev_link' => theme_get_next_post_link('%link &raquo;')
                            )
                        );
                    }
                    
                } else {    
                  
                    theme_404_content();
                    
                } 
            ?>
            
            <?php get_sidebar('bottom'); ?> 
          <div class="cleared"></div>
        </div>
        <div class="art-layout-cell art-sidebar1">
         <div class="art-layout-glare">
          <div class="art-layout-glare-image"></div>
         </div>
          <?php get_sidebar('default'); ?>
          <div class="cleared"></div>
        </div>
    </div>
</div>
<div class="cleared"></div>
<?php get_footer(); ?>

Подскажите пожалуйста куда вставлять код

Ищите файлы типа content*.php
В них будет ваш the_content();

Ну Вот я нашол content-single.php там есть еще другие но это похоже с других страниц, вот код который там:

<?php
    global $post;
    theme_post_wrapper(
        array(
                'id' => theme_get_post_id(), 
                'class' => theme_get_post_class(),
                'title' => theme_get_meta_option($post->ID, 'theme_show_post_title') ? get_the_title() : '',  
                'before' => theme_get_metadata_icons('date,author,edit', 'header'),
                'content' => theme_get_content(),
                'after' => theme_get_metadata_icons('category,tag', 'footer')
        )
    );
?>

получается если разместить в его средине то страница просто не открывается, а если в конце то кнопка уже получается под тегами и т.д.

Тогда попробуйте поковырять функцию theme_get_content() (наверняка в functions.php)
Уж больно крутая у вас тема 🙂

Anonymous
Отправить
Ответ на: