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.

Wordpress Show Latest Blog Post Title

Featured Replies

Hello Guys take a look here http://94.136.40.103/~x2uk.com/

 

On the front page of this site I have made an area where my client would like the title of the latest blog post to be injected and to only show the Latest blog posts of a particular category let's say "Latest News" This way they can control which announcements go to the front page.

 

Ideally the blog title would also click through to that blog post.

 

I wondered if anybody has done anything like this before and suggest a way I can go about it .

 

Many Thanks

 

Luke

  • Author

Hi Guys I sussed It , I used this piece of code which allowed me to select a category number , the amount of posts to show and then to create a title with permalink.

 

<?php
$featuredPosts = new WP_Query();
$featuredPosts->query('showposts=1&cat=14');
while ($featuredPosts->have_posts()) : $featuredPosts->the_post(); ?>
<a href="<?php the_permalink() ?>"><?php the_title(); ?> <i>... Read Story</i></a>
<?php endwhile; ?>

 

Thanks to anybody that was considering helping me , hopefully this will help some people out too

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.