Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter aljuk

    (@aljuk)

    To expand on that a bit, I have a wp_query loop of a cpt running inside a page template, and the_title no longer displays the title of the post in the loop. Now, every instance of the_title displays the overall page title.

    Really annoying.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    *Looks*

    Works fine on my page template. What code are you using?

    Thread Starter aljuk

    (@aljuk)

    the_title_attribute is also broken, and $post->ID no longer gets the correct post id.

    Thread Starter aljuk

    (@aljuk)

    This is a stripped-down version of the code :

    <?php $args = array('post_type' => 'something_else');
    $my_query = new WP_Query($args);
    if ( $my_query->have_posts() ) : while ( $my_query->have_posts() ) : $my_query->the_post(); ?>
    <h3><?php the_title() ?></h3>
    <?php endwhile; endif; wp_reset_query() ?>

    the_title should return the title of the post inside the loop. Instead, it returns the title of the page.

    Thread Starter aljuk

    (@aljuk)

    adfadfad

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘the_title broken functionality in 4.3’ is closed to new replies.