3stripe
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: If a custom field exists for a post, output the valueNice snippet Kafk 🙂
I spent ages searching for this, seems a lot of people have problems with custom field values…
Forum: Plugins
In reply to: Hacking c2c_get_recent_posts – need some php helpI’ve posted the code at http://wordpress.org/support/topic/51607 as this thread should be closed/deleted really.
Forum: Plugins
In reply to: Showing metadata with get_recent_posts ?Line 265-ish of customizable-post-listings.php, add:
case '%post_category%':
foreach((get_the_category()) as $cat) {
$new = $cat->cat_name;
}
break;Line 309-ish of the same file, in the list of percentage tags, add:
“%post_category%”, // The category of the post
Now when calling c2c_get_recent_posts you can include the category using %post_category% 😀
Please note I’ve change the name to %post_category% instead of %the_category% to make it consistent with the rest of the plugin. At the moment this only adds the category name, not a link to the category. Still working on that!
Forum: Plugins
In reply to: Showing metadata with get_recent_posts ?Got it working 🙂
Will post full solution when I’ve spoken to the plugin author!
Forum: Plugins
In reply to: Hacking c2c_get_recent_posts – need some php helpThink I got it, although not sure if this is the right way to do this!
case '%the_category%':
foreach((get_the_category()) as $cat) {
$new = $cat->cat_name;
}
break;Forum: Plugins
In reply to: Showing metadata with get_recent_posts ?Can’t work out how to feed in the category name…
I need to write something like:
$new = category_nicename;But I can only do this using the get_the_category function? (http://codex.wordpress.org/Template_Tags/get_the_category)
Forum: Plugins
In reply to: Showing metadata with get_recent_posts ?Sure will…
If you have a look at http://www.tonguengroove.co.uk/index.php you’ll see the category is working, but not quite in the right place…
I think it might be due to the link in the_category() so I’m going to try calling the unlinked version instead and then relink it
Forum: Plugins
In reply to: Showing metadata with get_recent_posts ?Hey thanks Ian…. i’ve just been tring to hack the plugin and by adding this in the “Perform percent substitutions” loop I’ve almost got the category to show up now!
case '%the_category%':
$new = $new = the_category();
break;So now I just include %the_category% when I call the function… but the category seems to be doing funny things to the layout as it’s a link as well. Back to drawing board!
Forum: Plugins
In reply to: Exclude postings from main RSS feed?Hey guys,
I’m reading this with much interest – as I need to exlude 2 categories from my website – but the code needs to be different as I’m using php to extract data from mySQL and feed it into a Flash website.
Can anyone how to tweak this code to exclude category IDs 1 and 2?
/* Fetch all the data from wp_posts table */
for ($i=0; $i< $nRows; $i++){
$row = mysql_fetch_array($qResult);
$rString .="&ID".$i."=".$i."&"."&post_title".$i."=".$row['post_title']."&"."&post_date".$i."=".$row['post_date']."&"."&post_content".$i."=".$row['post_content']."&";
}
/* Output the data as a string so Flash can read it */
echo $rString."&";Cheers 🙂
Forum: Fixing WordPress
In reply to: Images specified in Custom Fieldscbit, did you find anything to insert an image automatically into a custom field? i imagine you could do this by hacking an image plugin, but i’m not enough of a programmer to do this 😛
Forum: Plugins
In reply to: Plugin for Managing Many Posts and Pages in Admin?Ah cool, it looks like http://www.coldforged.org/the-enhanced-view-plugin/ lets you browse by author/category/date 🙂 🙂
Forum: Plugins
In reply to: Plugin for Managing Many Posts and Pages in Admin?I would also love to split my posts by category in the Admin panel… is it possible?
Forum: Your WordPress
In reply to: Thoughts on new watercolour website1/ Aseop, the top nav has been bugging me also. I think you might have a good suggestion on that front.
2/ I’ve just got a new iMac with a huge screen and I see what you mean now about point size!Cheers.
Forum: Plugins
In reply to: Hacking eSPG for WordPress – can you help?I need to delete this post… can i do it myself or does admin have to?
Thanks in advance.
Forum: Your WordPress
In reply to: Thoughts on new watercolour websiteThat is very kind, thank you 🙂