knightkato
Forum Replies Created
-
Forum: Plugins
In reply to: Writing my own insert into post pluginBump!
Forum: Plugins
In reply to: customising the “Insert Into Post” codeHey Matt, did you ever figure out how to do it? I’m trying to change the insert into post output when uploading videos, as it is right now it’s just inserting the filename, not exactly helpful..
would be super if anyone has an idea how to do it..
Forum: Fixing WordPress
In reply to: Insert into Post codeHow did you solve it? I’m also trying to figure that out.
Forum: Fixing WordPress
In reply to: List excerpts of Child pages on the Parent page.Works perfectly! Thanks a bunch, saved my day.
Forum: Fixing WordPress
In reply to: How to get permalink to the 2nd post on Index.phpThanks! Exactly what I needed. You the man!
Forum: Fixing WordPress
In reply to: List excerpts of Child pages on the Parent page.Correction, its working if I take away the if ($pageChild->post_excerpt){ line,
could i get the permalink by the same method?
as in,
echo '<a href="$pageChild->perma_link'"> '.$pageChild->post_excerpt.'</a>';
?Forum: Fixing WordPress
In reply to: List excerpts of Child pages on the Parent page.Thanks MichaelH,
It works for the title but not for the excerpt, i’d also need to get the permalink surrounding the excerpt, but maybe that’s it’s outputted by default. (I think so)
I’m guessing it has something to do with wp’s way of dealing with page excerpts, but they do exist in the database, so it should be fine.
Forum: Fixing WordPress
In reply to: Assign Children of a Page specific class.Found a better one, list pages plus, wp_list_pages_plus lets you assign child/parent classes. Very Handy.
Forum: Fixing WordPress
In reply to: Getting URL of next/previous linksHej,
I’ve been trying to use it like this,
<a href="<?php $prevPost = get_previous_post(true); $prevURL = get_permalink($prevPost->ID); ?>">previous
but it just gives me a link to the current post, if i’m on ?p=6 it generates a link to ?p=6,
what am i missing?
Forum: Fixing WordPress
In reply to: How to get the link out of php next_post_linkOk, clarification update, All i’m looking for is a replacement for <?php next_post(); ?>
i need to be able to put the link to the next post in an href
Forum: Fixing WordPress
In reply to: [How To] Show Posts Related To Category Only?Duuuh, needs to be in the sidebar of course. Works nicely!
Forum: Fixing WordPress
In reply to: [How To] Show Posts Related To Category Only?The code fetches the right posts from the category, but the permalinks aren’t updating the single. It’s pretty strange, when I’m on post1 and click the link for post2, the url changes, but not the content.
<?php global $post; $categories = get_the_category(); foreach ($categories as $category) : ?> <h3>More News From This Category</h3> <ul> <?php $posts = get_posts('numberposts=20&category='. $category->term_id); foreach($posts as $post) : ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> <li><strong><a href="<?php echo get_category_link($category->term_id);?>" title="View all posts filed under <?php echo $category->name; ?>">ARCHIVE FOR '<?php echo $category->name; ?>' CATEGORY ?</a></strong></li> <?php endforeach; ?> </ul> </div> <div id="content"> <?php the_post() ?> <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>"> <h2 class="entry-title"><?php the_title() ?></h2> <div class="entry-content"> <?php the_content() ?> <?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'sandbox' ) . '&after=</div>') ?> </div>
Forum: Fixing WordPress
In reply to: [How To] Show Posts Related To Category Only?current category, let’s call it the active category instead.
i’m on a single, i want to generate a list of all the post that are in the same category as the post i’m viewing and put it as a list in the sidebar.
so if i go to post2 under category about, it shows me all the posts under category about in the sidebar, nothing else, and if i go to post4 that’s in category work, it shows only the posts from work in the sidebar.
that’s about as clear as i can get.
Forum: Fixing WordPress
In reply to: [How To] Show Posts Related To Category Only?Yes, a list of all the posts of the current Category. Not a specific category, but the current one. Clear? ??
Forum: Fixing WordPress
In reply to: [How To] Show Posts Related To Category Only?The problem, as I probably should have mentioned in my previous post, is that the solution Stretsh supplied is returning all the posts, not just for the active category.
I’ve been looking around for quite some time now to find a simple way of listing all posts in the single.php and category.php from the Active category without any luck..,
so if I have 3 categories with 5 posts each and then when i click post-1 in category-1, i want a list of all the other posts in category-1
any ideas how I would go about doing that?