Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Can you please let me know slug of your custom posttype?

    Please paste here the admin URL when listing posts of custom posttype ‘advert’.

    Hi ananzhe25,

    Please use the following code and let me know if it works:

    <?php get_header(); ?>
    
    <div id="content">
    	<?php tie_categories_filter(); ?>
    	<div id="grid">
    	<?php get_template_part( 'loop', 'index' );	?>  <!-- .first-loop -->
    	<?php if ( ! have_posts() ) : ?>                 <!-- .second-loop -->
    	<div id="post-0" class="post not-found item-list">
    		<h2 class="entry-title"><?php _e( 'Not Found', 'tie' ); ?></h2>
    		<div class="entry">
    			<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'tie' ); ?></p>
    			<?php get_search_form(); ?>
    		</div>
    	</div>
    
    <?php else : ?>
    <?php
    $count = 0;
    $post_width = tie_post_width();
    $exc_home_cats = tie_get_option( 'exc_home_cats' );
    $paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
    if( is_home() && $exc_home_cats ):
    $query = new WP_Query( array( 'post_type' => 'advert', 'category__not_in' => $exc_home_cats, 'paged' => $paged ) );
    //query_posts( array( 'advert', 'category__not_in' => $exc_home_cats , 'paged' => $paged) ); ?><!-- .custom-post-type-advert -->
    <?php while ( $query->have_posts() ) : $query->the_post();
    	$count++;
    	$color = '';
    	$get_meta = get_post_custom($post->ID);
    	$tie_post_color = $get_meta["tie_post_color"][0];
    	if( !empty($tie_post_color)) $color ='custom-color '.$tie_post_color;
    ?>
        <div id="q8daily">
    	<article <?php post_class('item-list post rtl-item '.$color.' '.$post_width) ?>>
    		<div class="post-inner">
    			<?php
    				$format = get_post_format();
    				if( false === $format ) { $format = 'standard'; }
    			?>
    			<?php get_template_part( 'content', $format ); ?>
    
    	</article><!-- .item-list -->
    	</div>
    
    <?php endwhile; //this was missing from your code.
    			endif;
    		endif;
    		 ?>
    	</div><!-- .grid /-->
    	<?php if ($wp_query->max_num_pages > 1) tie_pagenavi(); ?>
    </div><!-- .content /-->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Regards,
    Rahul

    Hi rsag,

    Have you checked in your database in wp_options table that siteurl and home have the same URL of your website. If it is not same then please change it or you can define it in wp-config.php file by adding code below:

    define('WP_HOME','https://example.com');
    define('WP_SITEURL','https://example.com');

    Let me know your inputs here.

    Regards,
    Rahul

    Please try following code and let me know your inputs here:

    <?php get_header(); ?>
    
    <div id="content">
    	<?php tie_categories_filter(); ?>
    	<div id="grid">
    	<?php get_template_part( 'loop', 'index' );	?>  <!-- .first-loop -->
    	<?php if ( ! have_posts() ) : ?>                 <!-- .second-loop -->
    	<div id="post-0" class="post not-found item-list">
    		<h2 class="entry-title"><?php _e( 'Not Found', 'tie' ); ?></h2>
    		<div class="entry">
    			<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'tie' ); ?></p>
    			<?php get_search_form(); ?>
    		</div>
    	</div>
    
    <?php else : ?>
    <?php
    $count = 0;
    $post_width = tie_post_width();
    $exc_home_cats = tie_get_option( 'exc_home_cats' );
    $paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
    if( is_home() && $exc_home_cats )
    $query = new WP_Query( array( 'post_type' => 'advert', 'category__not_in' => $exc_home_cats, 'paged' => $paged ) );
    //query_posts( array( 'advert', 'category__not_in' => $exc_home_cats , 'paged' => $paged) ); ?><!-- .custom-post-type-advert -->
    <?php while ( $query->have_posts() ) : $query->the_post();
    	$count++;
    	$color = '';
    	$get_meta = get_post_custom($post->ID);
    	$tie_post_color = $get_meta["tie_post_color"][0];
    	if( !empty($tie_post_color)) $color ='custom-color '.$tie_post_color;
    ?>
        <div id="q8daily">
    	<article <?php post_class('item-list post rtl-item '.$color.' '.$post_width) ?>>
    		<div class="post-inner">
    			<?php
    				$format = get_post_format();
    				if( false === $format ) { $format = 'standard'; }
    			?>
    			<?php get_template_part( 'content', $format ); ?>
    
    	</article><!-- .item-list -->
    	</div>
    
    <?php endif;
    		endwhile; //this was missing from your code. ?>
    	</div><!-- .grid /-->
    	<?php if ($wp_query->max_num_pages > 1) tie_pagenavi(); ?>
    </div><!-- .content /-->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Regards,
    Rahul

    Hi ananzhe25,

    Can you please check by replacing following line of code with I have given?

    if( is_home() && $exc_home_cats ) query_posts( array( 'advert', 'category__not_in' => $exc_home_cats , 'paged' => $paged) ); ?>

    My Code:

    if( is_home() && $exc_home_cats ) query_posts( array( 'post_type' => 'advert', 'category__not_in' => $exc_home_cats , 'paged' => $paged) ); ?>

    Let me know your inputs for the same here.

    Regards,
    Rahul

    Hi sachinwebnexus,

    Can you please provide us structure of your custom table i.e: wp_user_detail

    We need to know all the column names first as I think you are missing something in it.

    Regards,
    Rahul

    Thread Starter rahulmultidots

    (@rahulmultidots)

    Hi KTS915,

    Thanks for your inputs. I have resolved this issue by changing my hosting provider.

    Sorry

    My Mistake. Please use apply_filters() instead of apply_filter(). So the code will be as below:

    <tr class="order-total">
           <th><?php _e( 'Total', 'woocommerce' ); ?></th>
    	    <td data-title="<?php esc_attr_e( 'Total', 'woocommerce' ); ?>">
                    <?php echo $value = apply_filters('woocommerce_cart_totals_order_total_html'); ?>
                </td>
       </tr>

    Let me know if this works!

    Regards,
    Rahul

    Hi shahidibex,

    Please try the following code and let me know if it is working or not:

    <tr class="order-total">
           <th><?php _e( 'Total', 'woocommerce' ); ?></th>
    	    <td data-title="<?php esc_attr_e( 'Total', 'woocommerce' ); ?>">
                    <?php echo $value = apply_filter('woocommerce_cart_totals_order_total_html'); ?>
                </td>
       </tr>

    Regards,
    Rahul

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