nateomedia
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: alphabetical archivesI was right, updating WP-SNAP! to include the ability to work on Pages was a… snap. One line of code and BAM! An exciting world of new possibilities.
Get WP-SNAP! version 0.2 right here:
Forum: Fixing WordPress
In reply to: alphabetical archivesYes, WP-SNAP! was created specifically for use in categories, but I certainly could modify it to work with pages as well. I’ll add it to my to-do list. ??
(Actually, thinking about it, I think it would only take about one line of code… I’ll tinker later tonight.)
Forum: Plugins
In reply to: Quick way to do alphabetical category archive?To anyone in need of an alphabet-based post navigation menu, I have transformed this code into a plugin.
Forum: Requests and Feedback
In reply to: Tried and tried but WP doesn’t work for me.You say you’re using the default theme but then go onto say that “my links” are not working — rather than “the theme’s links” — does this mean that you’ve made changes to the theme? Does the theme work without modification?
As far as urls go, I tried the permalink structure and couldn’t really get it to work either, but really didn’t care. This is what I put for structure:
‘/index.php?p=%post_id%’
Give it a shot.
Beyond that, I would suggest making your php files available.
By the way, if your friends are still in Kauai, tell them to go to a restaurant called The Blossuming Lotus. It’s a must visit (especially if they’re into healthy foods).
Forum: Fixing WordPress
In reply to: How to create a non-inline comments form?Ah, very simple. Just add this to the form:
<input type="hidden" name="redirect_to" value="index.php?p=<?php echo $id; ?>" />
Forum: Fixing WordPress
In reply to: How to create a non-inline comments form?I figured it out. Simple trick, actually. Basically, I put an if statement on the single.php page and used $_GET to determine what part of the post got displayed (ie, article, comments, or coment form). Here’s the basic structure:
<?php while ( have_posts() ) : the_post(); ?>
<?php if ( ( $_GET['read'] == NULL ) && ( $_GET['write'] == NULL ) ) { ?>
<?php the_content(); ?>
<?php } elseif ( $_GET['write'] == 'true' ) {
if ('open' == $post->comment_status) { ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="f_article_comment">
<?php do_action('comment_form', $post->ID); ?>
</form>
<?php }
}
if ( $_GET['write'] == NULL ) { ?>
<?php comment_text(); ?>
<?php } endwhile; ?>
Then, to pass write or read to the url, create your links like this:
<li><a href="index.php?p=<?php echo $_GET['p']; ?>&read=true">Read Comments Made</a></li>
<li><a href="index.php?p=<?php echo $_GET['p']; ?>&write=true">Write A Comment</a></li>
Voila!
Still working out some small issues … trying to figure out how to pull write=true from the url after a comment is submitted. Need to do a little more tinkering.
Haven’t actually implemented the custom comment field yet… the solutions I’ve seen require changing the wp code… maybe it time to learn how to make a pluggin (if this is possible).
Forum: Fixing WordPress
In reply to: How to create a non-inline comments form?Bump. Anyone able to shed some light on this? I’ve found info on how to add fields to display the user’s location, but not the rest. Thanks.
Forum: Plugins
In reply to: Multiple category_name or alternative?Do you plan to have empty categories? Why? This sounds like a bug in any case, but try posting some content to each category you call and see if that fixes things. Since you probably won’t have empty categories, it sounds like this might solve your problem.
Forum: Plugins
In reply to: Assign categories to Pages?I didn’t completely understand the initial request. The only thought I can offer is that you could hardcode your WordPress Help Page into your WP category template (if you’ve got a separate template for WP), otherwise you could use a conditional statement to get the link to appear —
if ( is_category ( '#' ) ) { echo "<a>WordPress Help</a>" }
.Forum: Plugins
In reply to: Assign categories to Pages?Uh, why not just make “wordpress help” a category?
Forum: Fixing WordPress
In reply to: Link Category header change numberAh ha!
<?php
ob_start();
get_links_list('order');
$string = ob_get_contents();
ob_end_clean();
ob_end_flush();
$patterns[0] = '/echo/';
$patterns[1] = '/h2/';
$replacements[0] = '';
$replacements[1] = 'h3';
preg_replace( $patterns, $replacements, $string );
?>
Forum: Plugins
In reply to: Multiple category_name or alternative?So, are posts showing up correctly for the loop? Is the problem just with your asides? Maybe you need to rewind the loop for your asides?
Forum: Fixing WordPress
In reply to: Link Category header change numberGah! I’m trying to get this to work, but I’m stuck. I did some digging and rewrote the code thusly:
<?php
$string = get_links_list('order');
$pattern = '/<h2>(.*?)</h2>/';
$replacement = '<h3>\\1</h3>';
echo preg_replace( $pattern, $replacement, $string );
?>
For the life of me, I cannot get it to work. I’ve even tried running very simple preg_replace queries and they aren’t working. I’m missing something.
Forum: Plugins
In reply to: Multiple category_name or alternative?Maybe post your loop?
Forum: Plugins
In reply to: Multiple category_name or alternative?Works for me. You are, of course, substituting in your category numbers, correct?
Here’s the whole structure of the loop I’m running:
<?php
$posts = 3; //Number of posts to display
query_posts('cat=##,##,##,##&showposts='.$posts);
while ( have_posts() ) : the_post(); { ?>
//Insert article content here
<?php } endwhile; ?> //
I use $posts as a counter in the loop so that the last post can have a special css class.