WordPress.org

Support

Support » Plugins and Hacks » Yoast SEO » Title and Description not showing on pages using a custom template page

Title and Description not showing on pages using a custom template page

  • Hi,

    My site uses a custom page template, which among others lists posts from specific categories.

    I would like to display the respective category titles and descriptions on the pages which use this page template.

    Here’s a snippet of the code used in the page template:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Is there any way for WordPress SEO to get the category for each page using this template, to use it to build titles and descriptions?

    Cheers

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m also getting the same problem on my Testimonial page and also due to that, the Testimonial Widget is causing a wrong display of title and description of my Homepage.

    Problem solved for me..

    (wasn’t the same problem as above)

    Problem not solved for me (is the same problem as above ;-))

    Here’s the snippet of the code used in the page template:

    get_header();
    $catId = gp_get_category_by_slug($wp_query->query_vars['catname']);
    $catName = $wp_query->query_vars['catname'];
    ?>
     <div id="main_content">
     <!-- Start the Loop. -->
     <?php
    	$includeArray = array(
    		$catId
    	);
    	query_posts(array('category__in' => $includeArray, 'posts_per_page' => 10, 'paged' => $paged));
    	if ( have_posts() ) : while ( have_posts() ) : the_post();
    	$thumb_url = '';
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Title and Description not showing on pages using a custom template page’ is closed to new replies.
Skip to toolbar