On these pages are my WordPress plugins, the odd article and my Support Forum.

For my random rantings on everything else please visit my blog at Yellow Swordfish

WP Plugins


Articles

If you find any of my plugins useful, please comsider a donation towards my running costs.

Thank you

Current User: Guest
Please consider registering

 
Search Forums:


 




Show latest post on homepage

UserPost

5:32 pm
26 Sep 2007


Walter

Guest

 
1

I’d like to show the latest post (or an excerpt of it) on my homepage. Is there any way to do this?

 Thanks 

6:46 pm
26 Sep 2007


Yellow Swordfish

Admin

Peterborough, England

posts 4629

 
2

Interesting question. I certainly have not provided any template tag that would provide for this. And if you used your own RSS feed and cut it down to one post it would spoil the feed for anyone else.

The answer really is that without getting your hands dirty in the code then no - there is no current way to do this.

Can you write php? If so I can create a sql query that you could use? 

6:33 am
17 Jan 2008


Ricotrutt

Guest

 
3

I can write php and have the same problem, can you write the sql query so that i can display the new posts in my homepage please ? That would be very nice of you

 

regards 

9:11 am
17 Jan 2008


Yellow Swordfish

Admin

Peterborough, England

posts 4629

 
4

yes I can but you need to tell me exactly what it is you want. One post? 5 posts? 10 posts? The post content itself? The posters name? The topic? Forum? Let me know and I can send you the sql.

3:17 pm
26 Jan 2008


İSM@İL

Guest

 
5

I want it too. Show last 5 topics and list they.. Thank Yellow Swordfish..

3:35 pm
26 Jan 2008


Yellow Swordfish

Admin

Peterborough, England

posts 4629

 
6

Well this didn’t get done because nobody came back to me with details of that was wanted. So are you just after the SQL query

4:27 pm
26 Jan 2008


Josh-B

New Member

posts 2

 
7

I’d like to be able to post that on my Blog Homepage. Any way of doing it?

 

4:48 pm
26 Jan 2008


Yellow Swordfish

Admin

Peterborough, England

posts 4629

 
8

The same question. Show what on your home page…?

4:50 pm
26 Jan 2008


Josh-B

New Member

posts 2

 
9

Yellow Swordfish said:

The same question. Show what on your home page…?



Show the last 5 posts from the Forum on the homepage. Title & Some of the Post.

 

9:20 pm
26 Jan 2008


İSM@İL

Guest

 
10

Add this code sidebar.php

<?php if (function_exists(’sf_recent_posts_tag’)) {
  sf_recent_posts_tag(5, 1, 1, 1, 1);
} ?>

9:43 pm
26 Jan 2008


Yellow Swordfish

Admin

Peterborough, England

posts 4629

 
11

That doesn’t show the post content though… just the title.

10:45 pm
26 Jan 2008


Mr Papa

Moderator

Arizona, USA

posts 1256

 
12

We will add this feature to the upcoming 3.0 version… I should be able to make it work for the current version too and will post the resulting template tag so you wont have to change it when you upgrade… I hope to get it done this weekend…

or maybe not… backwards compatibility is gonna be difficult…

12:26 am
27 Jan 2008


Mr Papa

Moderator

Arizona, USA

posts 1256

 
13

For those of you who just want to display the last X number of topics on your front page, there is already a template tag to do this… it will not show any post content though…  the tag is:


sf_recent_posts_expanded();

put the number of posts you desire within the ()… the default is 5…

however, since this is displayed outside of the simple forum pages, it doesnt get the proper forum appearance styling…  you can fix this by forcing WP to load the SF styling on the front page…  add this code to your header.php (or whatever file your theme uses to load the theme styles):


<?php if (is_home()) echo '<link rel="stylesheet" type="text/css" href="/wp-content/plugins/simple-forum/skins/default/default.css" />'; ?>

If you are not using the default skin, simply change that path to the SF skin you are using… 

This will give you a very SF looking list of the last X number of topics… 

12:01 pm
5 Jul 2008


sebby

New Member

posts 2

 
14

Can I show the last five Posts from the Forum on this site: http://www.steuerratgeber-online.de/html/test.php ??? How does it work?

The Forum: http://www.steuerratgeber-online.de/Steuerfragen/forum/


3:25 pm
5 Jul 2008


Mr Papa

Moderator

Arizona, USA

posts 1256

 
15

absolutely you can…  use one of the supplied template tags…  this assume that the forum and page you reference are running on the same wp installation…  if not, you can still do it, but you will need to write the code…

see the online help for information on the template tags, which one you want to use and how to use it…



Reply to Topic: Show latest post on homepage

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 10 + 3        (Required)

Topic Reply:


 
 

About the Stuff at Yellow Swordfish forum

Currently Online:

RobertB

11 Guests

Maximum Online: 71

Forums:

Groups: 3

Forums: 15

Topics: 1776

Posts: 11973

Members:

There are 819 members

There are 749 guests


Yellow Swordfish has made 4629 posts

Top Posters:

Mr Papa - 1256

-Radio- - 481

ovizii - 93

jfv - 80

angelic007 - 66

Administrator: Yellow Swordfish | Moderators: Yellow Swordfish, Mr Papa, -Radio-


© Simple:Press Forum - Version 3.1.4 (Build 357)