How do I have comments on a custom page ?

Best WordPress theme for festivals or other events with responsive, clean and unique design.
GK User
Tue May 14, 2013 9:20 am
I have installed a plugin that produces a page with a map on it. As per instruction of the plugin designer, I have created a special page called single.maplist.php based on single.php that I saved in the root of the Fest theme.


I want users to be able to add comments to that page.

So I went and pasted

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

but still no comment fields showing:

http://roadgirls.com/2/location/eze/




Here is the code of the custom single page.



Code: Select all
<?php

/**
 *
 * Single page
 *
 **/

global $tpl;

gk_load('header');
gk_load('before');

?>

<section id="gk-mainbody">
    <?php if (have_posts()) : while (have_posts()) : the_post();
                //Get the custom fields
                $custom_fields = get_post_custom($post->ID);
        ?>
       
        <div id="SingleMapLocation"><iframe width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=<?php echo $custom_fields["maplist_address"][0]?>&z=16&output=embed"></iframe></div>
       
        <h2 id="Maplocation-<?php the_ID(); ?>"><?php the_title();?></h2>
       
        <div id="MapDescription" class="cf">           
            <?php
            //Post featured image
            if(has_post_thumbnail($post->ID)){
                the_post_thumbnail(array(300,300), array('class' => 'float_left maplist_featuredimage'));
            }
           
            //Get the main content
            //$content = get_the_content();
            $content = do_shortcode( get_the_content() );
           
            if($content != ""){
                echo $content;
            }
            else{
                //If it's empty use the description field
               echo $custom_fields['maplist_description'][0];                 
            }           
            ?>
        </div>

        <?php
        //Show address if it is set
        if(isset($custom_fields['maplist_address'])){ ?>
        <div id="MapAddressContainer">
            <span id="MapAddressLabel">
                <?php _e('Address:','maplistpro') ?>
            </span>           
           
            <div id="MapAddress">
                <?php echo $custom_fields['maplist_address'][0];?>
            </div>           
        </div>           
       
        <?php } ?>
           
        <?php endwhile; endif;// end of the loop. ?>
       
        <?php
            if(isset($_SERVER['HTTP_REFERER'])){
                $url = htmlspecialchars($_SERVER['HTTP_REFERER']);
                echo "<a href='$url' id='MaplistBack' class='corePrettyStyle btn'>&laquo;" . __('Back','maplistpro') . "</a>";
            }       
        ?>
</section>

<?php

gk_load('after');
gk_load('footer');

// EOF





What can I do to make the comment field show up on that page in the frontend ?


Thank you
User avatar
Expert Boarder

GK User
Tue May 14, 2013 10:40 am
Just a quick question - have you selected this template as page template?
User avatar
Moderator

GK User
Tue May 14, 2013 10:42 am
Sory, never mind - You had to, as it is showing the map You need. Ill check that for You.
User avatar
Moderator

GK User
Tue May 14, 2013 10:50 am
The method You have used to add comments is ok, but You need one more step.
Go to wp-admin, edit your custom page, from screen options at top select "discussion" and then enable comments on that page.
User avatar
Moderator

GK User
Thu May 16, 2013 12:10 am
At the top of that page, I do not see a checkbox for Discussions.


here is the screen capture:


Image


Beleive me, even if you don't see the whole page, there is no checkbox for Discussions.

Is there something I can do to get the commenting system to show up on that page ?

:roll:
User avatar
Expert Boarder

GK User
Thu May 16, 2013 9:08 am
Strange. I have made a clear installation of WP with standard templates and the option is there everytime.
Next I have made a quickinstall of WP - Fest, and option is still there
Lastly I have made template installation of Fest and option is still there.

It seems that maybe some 3rd party plugin disables this option?
User avatar
Moderator


cron