Forums

Add "previous/next" to German Newspaper theme (2 posts)

  1. maddogprod
    Member
    Posted 3 years ago #

    I'm trying to add the Previous/Next buttons (posts_nav_link) to the bottom of the index page for the German Newspaper Theme and the code doesn't look like the PHP I'm used to. I like how it's done in the standard Kubrick theme but at the moment almost anything will do.

    THANKS!

    Here's the index.php code for this theme:

    <?php

    global $tab_feature_b1,
    $tab_feature_b2,
    $tab_count_b1,
    $tab_count_b2,
    $tab_b1_titles,
    $tab_b2_titles,
    $panel_1_active_tab_id,
    $panel_2_active_tab_id;

    get_header();

    if (have_posts())
    {

    echo ' <div id="content">' . "\n";

    if ( have_posts() )
    {
    while ( have_posts() )
    {
    the_post();

    echo ' <div class="post" id="post-' . get_the_ID() . '">' . "\n";
    echo ' <h2><a href="' . "\n";
    the_permalink();
    echo '" rel="bookmark" title="Permalink: ' . the_title( '', '', false) . '">' . the_title( '', '', false) . '</h2>' . "\n";
    echo ' </p>' . "\n";
    the_content('' . __('More on page ', 'german_newspaper') . $post->ID . "");
    echo ' <p class="details_small">' . __('Posted in: ', 'german_newspaper') . ' ';
    the_category(', ');
    _e(' | ');
    comments_popup_link(__('Comments (0)', 'german_newspaper'), __('Comments (1)', 'german_newspaper'), __('Comments (%)', 'german_newspaper'));

    echo ' <p class="postmetadata">' . "\n";
    the_tags(__('Tags: ', 'german_newspaper'), ', ', '
    ');
    echo ' </p>' . "\n";
    echo ' <p class="date">' . "\n";
    the_author();
    echo ' @ ';
    the_time('F j, Y');
    echo "\n" . ' </p>' . "\n";
    echo ' </div>' . "\n\n";
    }

    }

    else
    {
    echo ' <p>' . __('Sorry, no posts matched your criteria.', 'german_newspaper') . '</p>' . "\n";
    }

    echo ' </div>' . "\n\n";
    }
    else
    {

    echo '<div id="content">' . "\n\n";
    echo ' <h2>' . __('Not found', 'german_newspaper') . '</h2>' . "\n";
    echo ' <p>' . __('Sorry, no posts matched your criteria.', 'german_newspaper') . '</p>' . "\n";
    echo '</div>' . "\n\n";
    }

    get_footer();

    ?>

  2. iridiax
    Member
    Posted 3 years ago #

    What a strangely coded theme, an index.php all in ONE php tag! If you want to add html and php to this, you have to use the proper syntax to put it all inside this one php tag (ugh). Use the existing index.php code as an example for how it's done or do a Google search for: php tutorial

Topic Closed

This topic has been closed to new replies.

About this Topic