drinkonlyscotch
Forum Replies Created
-
Forum: Hacks
In reply to: Numbering IDsOkay, I just said screw it and used <?php the_ID(); ?>
Kinda sloppy, but it works.
Forum: Themes and Templates
In reply to: Twenty Ten Next/Previous LinksCool post, but it doesn’t address what i’m talking about. What I want to end up with is this:
<div class="nav-previous"><a href="the-prev-post-title" title="Previous Post: The Prev Post Title">← Previous Post</a></div>
Forum: Hacks
In reply to: Next/Previous Titles as Text (Not Links)Thanks guys. If anyone’s trying to do the same thing, here’s the final code:
<?php $branding = get_category('7'); $branding_count = $branding->category_count; $next_id = $my_post_count+1; $next_post = get_previous_post(true); $next_title = $next_post->post_title; if ( $next_id > $branding_count ) { } elseif ( $next_id == 2 ) { echo '<a href="#project-' . $next_id . '" "class="slide next button" title="Next Project: ' . $next_title . '">Next Project ↓</a>'; } elseif ( $next_id <= $branding_count ) { echo '<a href="#project-' . $next_id . '" "class="slide next button" title="Next Project: ' . $next_title . '">↓</a>'; } ?> <?php $previous_id = $my_post_count-1; $previous_post = get_next_post(true); $previous_title = $previous_post->post_title; if ( $previous_id > 1 ) { echo '<a href="#project-' . $previous_id . '" "class="slide previous button" title="Next Project: ' . $previous_title . '">↑</a>'; } elseif ( $previous_id == 1 ) { echo '<a href="#masthead" "class="slide previous button" title="Next Project: ' . $previous_title . '">↑</a>'; } elseif ( $previous_id == 0 ) { } ?>
Forum: Hacks
In reply to: Taxonomy-related posts in single.phpIf anyone’s curious, I found this, which seems to work perfectly:
https://www.nullcore.nl/100/using-a-custom-taxonomy-to-display-related-posts/Forum: Hacks
In reply to: Taxonomy-related posts in single.phpOh, another thing that may or may not be important. This is all in a Post Type called ‘work’ and not part of the standard posts.
Forum: Hacks
In reply to: Taxonomy-related posts in single.phpIt doesn’t seem to be working. A couple questions:
1. Does it need to be inside or outside the loop? I’ve tried it both ways.
2. Do I need to use a post rewind function?
3. I notice you have the taxonomy using plural in one place and singular in another. The taxonomy is ‘clients’ and the singular is ‘client’.Forum: Hacks
In reply to: Taxonomy-related posts in single.phpThanks a bunch. I haven’t tried it yet, but it makes perfect sense. Thanks!
Forum: Themes and Templates
In reply to: Help with Twenty TenComments.php contains the formatting for the comments themselves. What I’m looking for is the formatting of the comment form a user fills out to post a comment.
Forum: Fixing WordPress
In reply to: Situational Custom FieldsObviously, I would like to avoid requiring the author to paste code into posts with recipes, which would also require a php-exec plug-in or something similar.
Forum: Plugins
In reply to: [Plugin: Widget Context] The plugin does not work at all.The plug-in totally works, though it took me a few minutes to figure out what I was doing wrong. Basically, when you’re adding/excluding certain pages, you simply enter the name of the page, with no slashes. The note beneath it pertaining to the use of slashes is only relevant when you’re adding/excluding subpages.
For example:
If I want to have a widget only appear on the “Bicycles” page, I simply enter:bicycles
But if I want the widget to appear on subpages of the “Bicycles” page, I enter:
bicycles/*
Hope that helps.
Kaspars, great plug-in, but you could definitely improve the documentation. It’s super easy to use, but it doesn’t seem that way at first glance.