Viewing 1 replies (of 1 total)
  • Thread Starter Naresh

    (@nareshrathore)

    Here is the temporary solution to my problem but it makes recursive call for each post just to get the post title using get_post method.

    <li><a href="<?php the_permalink() ?>" title="<?php the_title();??>">
    					<?php if (get_the_title()) : ?>
    					    <?php the_title();??>
    					<?php else : ?>
    					    <?php echo do_shortcode('[coupon_title_show id=' . get_the_ID() . ']'); ??>
    					 <?php endif; ?>
    					 </a>
    					<?php if ( $show_date ) : ?>
    						<span class="post-date"><?php echo get_the_date(); ?></span>
    					<?php endif; ?>
    					</li>

    Though this works, I want better and optimum solution.

Viewing 1 replies (of 1 total)
  • The topic ‘Widget Title not appearing on Custom Post Page’ is closed to new replies.