next-post-link in same category
-
I found where to change in the loop.php file:
<?php /* Posts navigation for single post pages, but not for Page post */ ?>
<?php if ( is_single() && ! is_page() ) : ?>
<div class="post-nav clearfix">
<p id="previous"><?php previous_post_link('%link','%title',TRUE); ?></p>
<p id="next-post"><?php next_post_link('%link','%title',TRUE); ?></p>
<?php do_action('graphene_post_nav'); ?>
</div>
<?php endif; ?>The:
php previous_post_link('%link','%title',TRUE);php next_post_link('%link','%title',TRUE);From:
php previous_post_link();php next_post_link();But I only want to have this done on 1 category right now and not on every category and I do not want to change the loop.php file since updates will delete the changes.
I don’t know what code to put in the loop-single.php child file to override this without it changing everything.
I have not learned php yet 🙁
Should this be done by making a loop-single.php or by adding a new post format to go with Standard, Status, Audio, Image, Video…
Did you try
next_post_link('Next post in category', TRUE);??Edit: Try this –
next_post_link('%link', '%title', 'Next post in category', TRUE);Mod
You can try putting this in an action hook widget area (using the PHP Widget) and then use the Widget Logic plugin to make it show up just on posts in that category.
If you can get this to work, please be sure to let us know because I think a lot of people are interested in this.
Mod
Thanks. Good luck!
Ken,
is
<?php /* Posts navigation for single post pages, but not for Page post */ ?>
<?php if ( is_single() && ! is_page() ) : ?>
<div class="post-nav clearfix">
<p id="previous"><?php previous_post_link('%link','%title',TRUE); ?></p>
<p id="next-post"><?php next_post_link('%link','%title',TRUE); ?></p>
<?php do_action('graphene_post_nav'); ?>
</div>
<?php endif; ?>the php for the widget? I can put plain text in the widget and it goes in the correct place on the page, but the php code doesn’t do anything.
Mod
That is why you need the PHP widget. See this:
http://blog.kjodle.net/2011/11/04/graphene-action-hook-widgets-an-easy-way-to-modify-your-blog/
Mod
have this there only?
You’ve lost me here. Is it possible to see a link?
Viewing 10 posts - 1 through 10 (of 13 total)
- 1
- 2
- You must be logged in to reply to this topic.
