开发者

how to have wordpress comments functionality on every page

开发者 https://www.devze.com 2023-03-05 08:21 出处:网络
i am new to wordpress , i was given a task to convert a web site into wordpress. Following is what i have done.

i am new to wordpress , i was given a task to convert a web site into wordpress. Following is what i have done.

i changed the header of twentyten theme and added lot of javascript lib which were included on the original page.

i changed the index.php page and added the tables and divs so that site can have look and feel what it had before.

After reading bit of codex. i added the following at the bottom of the page to show wordpress comments.

<?php
    /* Run the loop to output the posts.
     * If you want to overload this in a child theme then include a file
     * called loop-index.php and that will be used instead.
     */
     get_template_part( 'loop', 'index' );
    ?>
    </div><!-- #content -->
</div><!-- #container -->

Till here every thing works fine and wordpress is show comments on this page as well. Now in the menu there is another page called next_level.php so i thought to display the commenting functionality of wordpress at the bottom of that page as well. so what开发者_运维知识库 i did as follows.

i included the same get_header() in the next_level.php page so that header source remains the same. i had few database queries running to display this page contents and for that i imported few tables from the previous site into the wordpress database. working fine.

The only problem i have is to show a commenting machenism of wordpress at the bottom of this page. Please guide,correct,suggest and help how to achieve this. Sorry for the long post.


Hey, I couldn't really understand the process you did or the result required, but I think this is the only line you need to display the comments at the bottom:

<?php comments_template( '', true ); ?>

0

精彩评论

暂无评论...
验证码 换一张
取 消