• I would like to submit my articles to a site called News Now. One of the requirements is that the actual article CONTENT be marked with

    <!– Article Start –>
    CONTENT
    <!– Article End –>

    See here for details.

    I’m using k2 and thought I could do this by inserting this in the page.php source code:

    <div class="entry-content"><!-- Article Start -->
    						<?php the_content(); ?><!-- Article End -->
    
    						<?php link_pages('<p><strong>'.__('Pages:','k2_domain').'</strong> ', '</p>', 'number'); ?>
    					</div>

    However when I view the source of my articles eg here I can’t see these comments inserted. Any ideas how I need to go about doing what they require?

    Thanks

    David

Viewing 2 replies - 1 through 2 (of 2 total)
  • Because page.php is for displaying Pages – what a surprize!
    Read, learn…
    Template_Hierarchy

    Thread Starter David Mottershead

    (@motty)

    Ok. Didn’t realise that. I’ve done some reading as suggested and put it in theloop.php file as follows:

    <div class="entry-content"><!-- Article Start -->
    				<?php if (is_archive() or is_search() or (function_exists('is_tag') and is_tag())) {
    					the_excerpt();
    				} else {
    					the_content(__('Continue reading','k2_domain') . " '" . the_title('', '', false) . "'");
    				} ?>
    
    				<?php link_pages('<p><strong>'.__('Pages:','k2_domain').'</strong> ', '</p>', 'number'); ?>
    			</div> <!-- Article End --><!-- .entry-content -->

    Is this the best method? Seems to work.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Inserting comments in articles’ is closed to new replies.