wasnotwas
Forum Replies Created
-
Ok I have answer to this problem. If I understand the problem correctly it is this. the_catagory does not work inside the loop on single.php
so I solved it with this piece of code.
foreach((get_the_category()) as $cat) { $categoryname = $cat->cat_name; } ?> <?php the_post(); ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2 class="page-title"><?php echo $categoryname; ?></h2>Forum: Fixing WordPress
In reply to: Problem importing an RSS feed into my WordPress blogI want it to look like a post
Forum: Fixing WordPress
In reply to: Problem importing an RSS feed into my WordPress blogNO – I want it not in the sidebar. I have divided the page up I use my own theme.
Forum: Fixing WordPress
In reply to: Problem importing an RSS feed into my WordPress blogHow can you use a widget in the page contents rather than the sidebar?
Forum: Fixing WordPress
In reply to: Problem importing an RSS feed into my WordPress blogI have downloaded 2.8 beta 1 and use the following code
<?php require_once (ABSPATH . WPINC . '/rss.php'); SimplePie($feed_url = 'http://alpha.libre.fm/rdf.php?fmt=rss&page=/user/bananabob/recent-tracks', $cache_location = null, $cache_duration = null) ?>And get the following error:
Fatal error: Call to undefined function SimplePie() inHelp!
Forum: Fixing WordPress
In reply to: Problem importing an RSS feed into my WordPress blogI think I might wait for WordPress 2.8 It should be easier then!
Forum: Fixing WordPress
In reply to: How to get Category Parent when post has multiple categoriesThis code outside the loop works.
<?php // This code checks to see if the parent is 6. There may be more than one category assigned to a post.
$savecat=$cat; // savecat is the cat found in the URL it need to be checked againt the possible categories for the post
foreach((get_the_category()) as $cat) {
if ( $cat->cat_ID == $savecat ): // Only when they agree will we check the parent
if ( $cat->category_parent=='6' ):
$query=$query_string . '&order=ASC'; // Then change the Sort order ASC if 6 is parent
query_posts($query);
endif;
endif;
}
?>
Forum: Installing WordPress
In reply to: Problems UpgradingThat has fixed it. Thanks very much. I shgould have thought of that myself, as I had problems with that on the other blog. I guess it was just too late at night for the old brain.
Forum: Fixing WordPress
In reply to: SamecatThanks works like a dream now.