kaistarr
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Insert blog posts on index.php outside WP directoryWell, I have resolved this unresolvable problem by removing the WP from my site. My WP was under constant hacker attacks, anyway, so I guess it’s no great loss. Sorry, guys. I really wanted it to work for me, but it just didn’t. Thanks to all those who tried to help me. I do appreciate your time and effort!
Forum: Themes and Templates
In reply to: WP Latest Posts in non-wordpress siteThis is great but you need URL file-access to make it work.
Try using “readfile” instead of “include,” if your host doesn’t let you include with a URL (mine doesn’t).
Forum: Fixing WordPress
In reply to: Insert blog posts on index.php outside WP directoryWell, after having tried everything here, I still can’t get anything to do what I had hoped it would do. I can get it to produce a linked list of the titles of the most recent posts, but that’s not what I’m after.
What I’m after is just one step more than I’m already doing with RSS, which is to have it show the comment status. I’ve already got it showing the linked title, full post content, time of post, and a hand-made link to the post’s specific WP page (followed by a divider image of my own), but I can’t for the life of me figure out how to add in the comment status, with the number of comments each post has, at the end of the post’s page link.
This is what I’ve got that is working for me, except for that one thing, the comment status:
<?php define('MAGPIE_DIR', 'magpierss/'); require_once(MAGPIE_DIR.'rss_fetch.inc'); define('MAGPIE_CACHE_ON', 0); $url = 'http://www.kaistarr.com/wordpress/?feed=rss2'; if ( $url ) { $rss = fetch_rss( $url ); echo "<div style=color:#000; width:420px; padding-left:30px; margin-bottom:20px; border-bottom: dashed 1px #000;>"; foreach ($rss->items as $item) { $href = $item['link']; $title = $item['title']; $description = $item['description']; $summary = $item['summary']; $content = $item['atom_content']; $encoded = $item['encoded']; $date = $item['pubdate']; echo "<h3><a href=$href>$title</a></h3>"; echo "$content"; echo "$encoded"; echo "<small><i>$date</small></i>"; echo "<i>Read or Add Comments on <a href=$href>$title</a></i><center><img src=http://www.kaistarr.com/stories/skins/rawhide/images/horizontalrule_brown.png></center>"; } echo "</div>"; } ?>I had
$comments = $item['comments'];and
echo "<a href=$href>$comments</a>";in there, at first, instead of my “read or add comments…” code, and it returned just a linked line that displayed the URL to that specific post, with the #comments added on the end. Not very pretty.
Is there something really simple that I’m missing, or is there simply no way to do what I want to do, outside of the WP directory? I can live with what I’ve already got it doing, but I’d sure like to have the comment status on there, too.
Thanks, again, for all the help you guys have given me. I’m sorry to be such a pest!
Forum: Fixing WordPress
In reply to: Insert blog posts on index.php outside WP directoryThanks for all the help, guys! My life has been really hectic, lately, so I haven’t had the time to try these things out, yet, but I will. Anyway, you rock! \(^o^)/
Forum: Fixing WordPress
In reply to: Insert blog posts on index.php outside WP directoryThanks, Peter! I’ll try that as soon as I get a chance, this week, and then post about whether or not I managed to screw it up, somehow. 😛
Forum: Fixing WordPress
In reply to: Insert blog posts on index.php outside WP directoryThanks for the advice, rawalex! I’m very inexperienced with php, though. This might be a bit beyond me, but I’m willing to learn and try it.
Forum: Fixing WordPress
In reply to: Insert blog posts on index.php outside WP directoryNope, I never did figure it out or get anything to work. And since I can’t get the comments to show in the feed on the index page, nobody comments…except spammers. I guess people don’t want to have to go to a second page, just to read or post comments. So my plan now is to just take down the WordPress blog and do my index-page blogging by hand, in an include or something. Shame, because I really liked the WP setup. I just can’t get it to do what I need it to do.