Responsive WordPress Theme – Caliber

A theme with simple controls and limitless potential. Work fast and build an amazing website!   Find out more »

UpThemes – Beautiful WordPress Themes

Create a site your church, gallery, newspaper, blog, recipes, band and more!   See the themes »

Need a little help?  Find answers quickly by searching the forum.
Group Admins
  • andy
  • jeffw
Group Mods
  • envatosupport

Create your travel agency, lodge, club, blog or destination website the quick and easy way. The GoExplore! travel WordPress theme can manage any travel website, from a personal travel blog to a world travel guide book.

GoExplore! (WordPress)

Public Group  |  active 1 year ago ago
Viewing post 31 to 35 (35 total posts)

Comments on destination and directory pages

  • davry21

    said

    Sorry I thought it was all under the umbrella of “Destination” pages. Thanks for your help!!

  • jeffw

    said

    No worries. If there is anything else about the GoExplore! theme itself you need help with, please just let us know. If you can’t find a solution using the forum search please create a new topic for each separate issue and we’ll do our best to help.

  • pmontesrincon

    said

    Hi. First of all, thanks for the help you give us Jeffw.

    I have entered the code that you have given us for the file ‘functions.php’ and the comments still do not appear.
    I have already read that in the post already published they do not appear, but in the new ones neither. In the screen options I have the option of comments enabled, but nothing. I am worried because comments are very important for my blog.
    I do not know what can fail so that they do not appear, because when making the text of a destination if the option to activate comments appears both in screen options and in the area below where you can activate comments as well (even add one ) and trackbacks and pingbacks.

    I put the code as you indicated at the end of the functions.php file. Start with // (Do you have to start with four ////?) And end with?> On the last line. I don’t know what can fail. I leave the link to my website.

    https://viveportugalweb.com/destinos/aveiro/

  • jeffw

    said

    The code works. Other customers have made the modifications and told us it works. I’ve done it myself so I know it works. I tested it before I posted it, and I just tested it again. The code works.

    Perhaps you have not made all the necessary modifications? I’ll go through it again, specifically for destination posts, which is what you asked about in another topic.

    First, add this code to your ‘functions.php’ file…

    // Enable support for comments
    function add_destination_comment_support() {
      add_post_type_support( 'destination', 'comments' ); // destination
    }
    add_action('init', 'add_destination_comment_support');

    Save and upload.

    Next, in the ‘single-destination.php’ template look for this…

    <div class="intro">
      <p class="lead"><?php echo get_destination_intro(); ?></p>
      <div class="entry-content"><?php the_content(); ?></div>
    </div>

    And change it to this…

    <div class="intro">
      <p class="lead"><?php echo get_destination_intro(); ?></p>
      <div class="entry-content"><?php the_content(); ?></div>
      <?php
      // If comments are open or we have at least one comment, load up the comment template
      if ( comments_open() || '0' != get_comments_number() ) {
        comments_template();
      }
      ?>
    </div>

    Save and upload.

    Now go to Settings > Discussion and make sure the the Allow people to post comments on new articles option is enabled…

         

    That automatically adds a Discussion metabox to the article editor for all NEW posts that support comments, and comments will be enabled by default.

    For existing destination posts that you want to enable comments on, edit the article, open the Screen Options tab and enable the Discussion option under the Boxes heading. Then scroll down the page until you see the Discussion metabox and enable the Allow comments option…

                   

    Don’t forget to click the Update button to save the changes to the article.

    Unfortunately we can’t make these modifications for you so if you are unable to make them work yourself you will need to consider hiring a professional to help you.

    Thanks.

  • pmontesrincon

    said

    Thank you. It is already fixed and the comments are activated correctly. The problem is that I had not put the code in ‘single-destination.php’. Thanks for the directions.

Viewing post 31 to 35 (35 total posts)