Ming
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Can this be done with categories in WPYou’ve got the right idea DGold and you could do that (see Multiple Loops in the Codex for more info). But that’s essentially what this plugin is doing – running mini loops with specific criteria.
To get the result you want with the plugin just do this:
<ul>
Category One
<?php c2c_get_recent_posts(2, "<li>%post_date%: %post_URL%</li>", "0000"); ?>
</ul><ul>
Category Two
<?php c2c_get_recent_posts(2, "<li>%post_date%: %post_URL%</li>", "0000"); ?>
</ul>You’ll need to replace “0000” with your category ID (check manage->category to find that). You can also change how the listings display. See the plugin homepage for more info on that.
Forum: Fixing WordPress
In reply to: Two Column Content?If you wanted to use a
<!-- split -->tag that’d be easy-ish. You’d need to assign your content to a variable using get_the_content(). Then just search and replace<!-- split -->with</div> <div class="secondColumn">. That’d close the first div you started before displaying the content and then start a second one. You’d use CSS to style the divs into columns.In your post loop it’d look roughly like this:
<?php $content = get_the_content(); ?>
<?php $content = str_replace( '<!-- strip -->', '</div> <div class="secondColumn">', $content); ?><div class="firstColumn">
<?php echo $content; ?>
</div>Anyway, hope that’s clear. Haven’t tested at all but it should get you started.
Forum: Themes and Templates
In reply to: How to get the current post slug?There is no ‘the_slug’ function in WordPress like there is for the_title, the_content, etc.
Forum: Plugins
In reply to: Sync RSS feed with custom fields?Oh heck, sure. Anything’s possible in this crazy ol’ world – just depends how much hacking you’re up for.
The feeds are generated with different php files depending on the feed flavor (rss/atom/rdf). See wp-feed.php in your install directory for the list.
There is a hook called ‘rss_item’ that may allow you to add custom fields using a plugin. If not, you can always hack the file(s) directly (watch your upgrades if you do).
Forum: Fixing WordPress
In reply to: Adding comments from the admin under random names?Comments can’t be written in the admin panel – you can only view or edit existing ones. The easiest way to add comments is using your comment form. Just make sure you’re logged out and you can use whatever name you like.
Forum: Fixing WordPress
In reply to: get_settings optionsIf I understand right, get_settings (and get_options) return values from your wp_options table using the ‘option_name’ field. The easiest way to get a list of options is to view the file ‘options.php’
www.yoursite.com/wp-admin/options.php.By the way, the get_settings page in the Codex needs some love if anyone has time to spare.
Forum: Fixing WordPress
In reply to: get_settings within an echoThe easiest way is to use the predefined TEMPLATEPATH.
<?php include (TEMPLATEPATH . '/features.php'); ?>Forum: Plugins
In reply to: Winter Olympics Medal Count plugin?Nice work, I like it. I hadn’t thought of checking medal counts through a RSS feed but now that you brought it up I’m surprised theres so little out there. It seems like a perfect use for syndication. Looks like you’re just way ahead of the crowd!
Forum: Plugins
In reply to: Winter Olympics Medal Count plugin?Yahoo! has RSS feeds for the medal count. Not sure how often the feed is updated.
Forum: Plugins
In reply to: wordpress as cms@marchern: As long as home.php exists WordPress will use that template for the front page. Just make sure it’s in your active theme directory. You can delete the following comment lines. WP doesn’t need them for recognized templates like home.php, index.php, etc.
<?php
/*
Template Name: HOMEPAGE THAT GIVES EXTERNAL LINKS
*/
?>
Forum: Fixing WordPress
In reply to: Make sub categories indentI think wp_list_cats assigns a class of “children” to sub-categories. So .children { margin-left: 8px; } sort of thing should do the trick.
Forum: Installing WordPress
In reply to: 1and1 with WordPressThe WordPress Codex has the installation instructions.
[http://codex.wordpress.org/Installing_WordPress]Forum: Fixing WordPress
In reply to: Make users login to view weblogWow, that’s a long URL… 🙂
Forum: Fixing WordPress
In reply to: Make users login to view weblogForum: Fixing WordPress
In reply to: editing/writing modeThere’s another option under Users->Your Profile that will turn off the visual editor for you. The checkbox you ticked sets the visual editor as default for *new* users. Not well worded but that’s what it does.