klifix
Forum Replies Created
-
Forum: Plugins
In reply to: The PHP code for the last 5 postsWell I did it and it now appears on the frontpage, only it says all (0) and not the number of replies. It doesn’t count, or it might only see no replies. In fact there are many replies in the last posts so it must to have count something….?????
Forum: Plugins
In reply to: The PHP code for the last 5 postsIt doesn’t work for me as well. It all mess up the index file.
Forum: Everything else WordPress
In reply to: Separate index filesomeone knows how to solve this?
Forum: Everything else WordPress
In reply to: Separate index fileOk, it works all fine already, except just one thing:
I’ve added the post.php and a page.php file to my theme. And so the index.php is modified to my needs.
When I post a post in my adminpanel the post is saved but my browser doesn’t bring me back to the adminpanel, instead of that it is followed by a blank page (page cannot be found), however the new post exist.
The full url to the 404 page is …/wp-admin/post.php, but it has to be …/wp-admin/post.php=true.
Is that correct, and if so: how can this be solved?
Forum: Plugins
In reply to: The PHP code for the last 5 postsThis is full code right now, without the nr of comments code in it:
<?php
$today = current_time(‘mysql’, 1);if ( $recentposts = $wpdb->get_results(“SELECT ID, post_title, post_date FROM wp_2posts WHERE post_status = ‘publish’ AND post_date_gmt < ‘$today’ ORDER BY post_date DESC LIMIT 25”)):
?>-
<li id=”recents”>
-
<?php
foreach ($recentposts as $post) {
if ($post->post_title == ”)
$post->post_title = sprintf(__(‘Post #%s’), $post->ID);$posttime = strtotime($post->post_date);
$mytime = date(‘<font color=”red”>H:i</font>’, $posttime);
$mydate = date(‘<font color=”red”>d/m</font>’, $posttime);
$currtime = time();
$today = date(‘d’,$currtime);
$postday = date(‘d’,$posttime);
if($postday==$today)
echo $mytime;
else
echo $mydate;echo ” ID’>”;
$shorten_title = truncate($post->post_title, 60);
echo $shorten_title;
echo ‘
‘;}
?><?php endif; ?>
So where has the commentscode go into to get it work?
Forum: Plugins
In reply to: The PHP code for the last 5 postsI used this code, but it doesn’t show anything at all, there’s nothing changed.
Forum: Plugins
In reply to: The PHP code for the last 5 postsI’ve another question raised of this issue:
How can I add the number of comments per post behind the last 5 posts like this:
>> 13:45 TRAFFIC JAM IN AMSTERDAM (5 replies)
???
Forum: Everything else WordPress
In reply to: Separate index fileI’ve added the single.php file and modified the index.php file. It works fine now, except one thing.
When I hit a recent post it shows up via the single.php file. So far so good. But when I hit a page then the index.php file is called and there’s only the content of the indexfile instead of the pagecontent.
How can this be solved (if you don’t understand what I mean, just take a look at my site and hit one of the pages that’s under “Specials” in the sidebar).
Forum: Plugins
In reply to: Integrating non-wp database into wordpressWhat I did to get the last 10 posts from my forum is to make a seperate .php file into a subfolder to get the information out of another database than wordpress. It works fine by me! Except it was a hell of a job and to explain this here it might take a lot of time, which I don’t have unfortunately. But if you take a look at this than you might get a lot further!:
https://forums.xmbforum.com/viewthread.php?tid=757978#pid1253650
Forum: Installing WordPress
In reply to: Custom tag for post-source…
Forum: Installing WordPress
In reply to: Custom tag for post-sourceanyone has a clue?
Forum: Plugins
In reply to: The PHP code for the last 5 postsLOL we where posting the same time! You solved the problem already, thanks anyway! ??
Forum: Plugins
In reply to: The PHP code for the last 5 postsYou where right! I called the truncate function twice. I removed it once and that did the trick! Thanx!
Forum: Plugins
In reply to: The PHP code for the last 5 postsOk, obviously I did something wrong! I’ll go testing out things and get back to you when I succeed! Thanx for helping me out!
Forum: Plugins
In reply to: The PHP code for the last 5 postsExactly!