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 6342553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:15:45+00:00 2026-05-24T20:15:45+00:00

Right now, the value of the variable $thumbs_number is +2. When I place <?php

  • 0

Right now, the value of the variable $thumbs_number is +2.

When I place <?php if ( $thumbs_number == 2 ) { echo "high-rated"; } ?>"> right before the closing </div> I do get an output: high-rated.

but when I place it inside the div’s class: <div class="topic-content <?php if ( $thumbs_number == 2 ) { echo "high-rated"; } ?>">.

nothing is output.

Any suggestions to fix this?

Full code:

    <div class="topic-content <?php if ( $thumbs_number == 2 ) { echo "high-rated"; } ?>">
        <span class="topic-author-link"><?php bbp_reply_author_link( array( 'type' => 'name' ) ); ?></span>
        <span class="topic-post-date"><?php printf( __( '<span>%1$s</span> <span>at %2$s</span>', 'bbpress' ), get_the_date(), esc_attr( get_the_time() ) ); ?></span>

<?php echo time_ago(); ?>
<br />
<?php echo "$post->post_modified \n"; ?>

        <?php bbp_reply_admin_links(); ?>

        <?php bbp_reply_content(); ?>

        <div class="topic-like-count">
            <h4><?php wp_gdsr_render_article_thumbs(); ?></h4>

            <?php preg_match( '!<div class="thumblock ">(.*)</div>!si' , wp_gdsr_render_article_thumbs(0, false, "", 0, "", false) , $n );
            $thumbs_number = strip_tags( $n[1] ); ?>

            <?php echo $thumbs_number; ?>

        </div>
  • 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-24T20:15:46+00:00Added an answer on May 24, 2026 at 8:15 pm

    The output is “nothing” because you have it in your HTML syntax. You should view the source to see what is has outputted.

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

Sidebar

Related Questions

I have this code right now to get the row value from jquery grid..
Right now my implementation returns the thing by value. The member m_MyObj itself is
Right now I have something like this in NHibernate: Expression.Like(property, value, MatchMode.Anywhere) and that
Right now I'm doing something like this: RewriteRule ^/?logout(/)?$ logout.php RewriteRule ^/?config(/)?$ config.php I
Right now I have this: session_start() $_SESSION['title'] = $_POST['title']; I store a variable from
How can I check if value is in mysql's table's column? Right now I'm
Right now this outputs the value I need on stdout. How can I capture
Right now when i'm setting publishing restrictions for items in Sitecore that get rendered
Right now, my HTML code looks like so: <div id=register> <table class=tab2> <tr> <td>Email:</td>
I have id values for products that I need store. Right now they are

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.