Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • add the if condition to check whether array is empty or not like
    if (is_array($posts)){
    foreach( $posts as $post ) {
    // Ignore the topic if included.
    if ( bbp_get_reply_post_type() == $post->post_type ) {
    $in_reply_to = get_post_meta( $post->ID, ‘_ucc_btr_in_reply_to’, true );
    if ( empty( $in_reply_to ) || ( bbp_get_reply_topic_id( $post->ID ) == $in_reply_to ) )
    $in_reply_to = 0;
    $post->in_reply_to = $in_reply_to;
    $replies[] = $post;
    } elseif ( bbp_get_topic_post_type() == $post->post_type ) {
    delete_post_meta( $post->ID, ‘_ucc_btr_in_reply_to’ );
    }
    }}

    Thread Starter induthotla

    (@induthotla)

    yes i logged in as a admin level user………
    any way my problem is solved………
    i downloaded new wordpress and installed my theme and db in to it…….its working fine but any other solution for this

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