Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6086379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:44:53+00:00 2026-05-23T11:44:53+00:00

The following if statement has 3 conditions: <?php if ( is_archive() ) : ?>

  • 0

The following if statement has 3 conditions:

<?php if ( is_archive() ) : ?>

    <?php $topic_tag_term = get_query_var( 'term' ); ?>

    <?php // Display the top topics of current forum
        $args = array(
            'post_type' => 'topic',
            'posts_per_page' => '3',
            'topic-tag' => $topic_tag_term,
            'r_sortby' => 'highest_rated',
            'r_orderby' => 'desc',
            'order' => 'DESC'
        );
    ?>

    <?php $term = $wp_query->queried_object; ?>
    <p>The following are a list of topic tagged as <strong><?php echo $term->name ?></strong>.</p>

    <?php if ( bbp_current_user_can_access_create_topic_form() ) : ?>

        <a id="new-entry" href="<?php echo home_url( '/' ); ?>/create-topic">Start a new topic</a>

    <?php endif; ?>

<?php if ( is_page_template() ) : ?>

    <?php // Display the top topics of current forum
        $args = array(
            'post_type' => 'topic',
            'posts_per_page' => '3',
            'r_sortby' => 'highest_rated',
            'r_orderby' => 'desc',
            'order' => 'DESC',
            'meta_key' => '_bbp_reply_count',
            'meta_value' => '1',
            'meta_compare' => '<'
        );
    ?>

<?php else : ?>

    <?php // Display the top topics of current forum
        $args = array(
            'post_type' => 'topic',
            'posts_per_page' => '3',
            'post_parent' => $post->ID,
            'r_sortby' => 'highest_rated',
            'r_orderby' => 'desc',
            'order' => 'DESC'
        );
    ?>

<?php endif; ?>

For some reason this code is breaking my page.

What is wrong with it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:44:53+00:00Added an answer on May 23, 2026 at 11:44 am
    <?php if ( is_page_template() ) : ?>
    

    should be

    <?php elseif ( is_page_template() ) : ?>
    

    at least this is the error I can see.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to ask whether the following statement where printf() has been provided with
I have following statement for query articles from some sections Article.all(:joins => :sections, :conditions
After running the following SQL statements, you will see that, MySQL has automatically created
I use the following statement prepared and bound in ODBC: SELECT (CASE profile WHEN
I tried running the following statement: INSERT INTO VOUCHER (VOUCHER_NUMBER, BOOK_ID, DENOMINATION) SELECT (a.number,
I have the following statement SELECT id, descr from mytable which returns 1, 'Test1'
If I execute the following statement: string.Compare(mun, mün, true, CultureInfo.InvariantCulture) The result is '-1',
How to write following statement in c using switch statement in c int i
I found the following statement: Map is an object that stores key/volume pairs. Given
I'm running the following statement to see what queries are executing in sql server:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.