Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Blog title bug

Featured Replies

Hey Aled,

 

I think this is down to what is being called between the <h1> tags of that template.

 

Are you able to copy the code from that section and paste it in here?

Cheers,
P

  • Author

Well that's what I thought but I can't figure out why whoever built the site have built it the way they have. It's very odd.

 

Here's the code on the latest-news.php file:

 

<ul>
    <?php
        $type = 'post';
        $args=array(
          'post_type' => $type,
          'exclude' => 'testimonials',
          'post_status' => 'publish',
          'posts_per_page' => 4
        );
        $my_query = null;
        $my_query = new WP_Query($args);
        if( $my_query->have_posts() ) {
          while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
        	<li>
        	    <div class="date">
        	        <?php echo get_the_date('<\sp\a\n \c\l\a\s\s="\m\o\n\t\h">M<\/\s\p\a\n\><\sp\a\n \c\l\a\s\s="\d\a\y">dS<\/\s\p\a\n\>'); ?>
        	    </div>
        	    <a class="title" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
            </li>
    
        <?php endwhile;
        }
        wp_reset_query();
    ?>
</ul>

Yeah that looks strange for what the page is doing as the above query should show only four posts per page.

 

<div class="article-header">
            
<div class="breadcrumbs">
    <!-- Breadcrumb NavXT 5.1.0 -->
<span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" title="Go to Luxury Holiday Lodges and Static Caravans for Sale or Rental in North Wales." href="http://tanrallt.co.uk" class="home">Home</a></span> > <span typeof="v:Breadcrumb"><span property="v:title">News</span></span></div>                
                
                <h1>The Cliffs Friday Night Fever Evening</h1>
                                    
            </div><!--/article-header -->

Looking at the source this is the section that you should be looking for - the article header and within the H1 tags there should be something similar to <?php the_title(); ?> that is being called to give the title of the page

  • 3 weeks later...

Are you sure that's the right template? The reason I ask is that its a bit odd to call a template that queries testimonials "latest-news.php". I'm also not seeing a permalink reference in the source code. There is a really handy little plugin called What the File if you want an easy way to see which template is being called.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.