Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Excerpts, Read more, Pagination (http://forum.bytesforall.com/forumdisplay.php?f=20)
-   -   Next/Previous Single Post Navigation (http://forum.bytesforall.com/showthread.php?t=6557)

samij0 Apr 1, 2010 09:08 AM

Next/Previous Single Post Navigation
 
Hi,

This seems like it should be an easy fix, but I haven't found the solution yet!

On single post pages, instead of the next/previous post navigation to say the title of the next/previous post, I'd like it to just say "Next Post" and "Previous Post". I tried putting "« Next Post" into the correct box on the Next/Previous Navigation page in Atahualpa, which puts the correct text there, but it doesn't actually link to the next post.

Thoughts?

lmilesw Apr 1, 2010 10:46 PM

Remember "Next Post" in WordPress means an older post so you would probably want to put "« Next Post" in to the "Older Post" link box and maybe switch it to "Next Post «"

samij0 Apr 2, 2010 07:44 AM

Thanks, Larry. That makes sense. However, it still doesn't create links to the older/newer posts, just the text. :(

lmilesw Apr 2, 2010 08:34 AM

I misunderstood what the problem was. Can you send a link to the site?

samij0 Apr 2, 2010 08:55 AM

I can't because it's a website I'm developing for a client and it's in maintenance mode, but let me try to clarify. When you're looking at a single post, the default previous/next post navigation will show one post name before and one post name after the current post. I'd like it to just say "previous" and "next" or "older" and "newer." Is there a way to do this?

lmilesw Apr 2, 2010 10:16 AM

It should be just as you did. Here is a screen shot to confirm.

darlene Oct 30, 2012 11:02 PM

1 Attachment(s)
I am having this same problem. On single posts I can only get the text newer and older. There are no links. I have a screen shot but I don't even know how to post it here. My site is darlenemichaud.com but I'm playing with it so you probably won't see what I mean. How to I put a screen shot here? When I try to attach all I get is this Attachment 2089

darlene Oct 30, 2012 11:04 PM

1 Attachment(s)
Oh! I see the screen shot! Here is the code I'm using... Attachment 2090

juggledad Oct 31, 2012 04:47 AM

currently on a 'single post' page, the links in the navigation area are the titles of the next and previous posts. If you want to change this, you will have to edit the theme code and keep notes so you can redo it everytime the theme is upgraded.

darlene Oct 31, 2012 06:16 AM

Okay, that's fine. I would not mind the entire titles but is there a way to make the text small?

juggledad Oct 31, 2012 06:55 AM

you can style it with CSS

darlene Oct 31, 2012 07:07 AM

I'm clueless, but that's okay. I try to learn one new thing per day and css is not on the list yet. LOL

jrobie23 Jul 25, 2013 05:05 PM

Hey Juggledad.. I see that this is a VERY old post, but I'm having the same issue. Is it still necessary to edit the theme code to get "next" and "previous" to be the LINKS at the top of the single-post pages?? I made the adjustments in the ATA next/previous section, but it does not seem to work. %link still works, but not just the text "next", etc...

thanks!

jr

jrobie23 Aug 1, 2013 11:10 AM

I don't suppose you'd want to shed some light on what parts of the bfa_next_previous_links.php file one should/could manipulate to get those post title/links to be different?? ;)

juggledad Aug 1, 2013 11:57 AM

so do you want the words 'next' and 'previous' and have those words be the links to th posts?

jrobie23 Aug 1, 2013 12:01 PM

absotively. posilutely. (yes.)
and if the client wants them changed, I'm guessing I'll be able to decipher what you've done to make adjustments.

juggledad Aug 1, 2013 02:23 PM

You will want to look at the code in bfa_next_previous_links.php to make the change you want. I toook a few minutes to see if I could give you an exact solution, but it is going to take some time to study the code and play and test it.

Let us know how you get it to work.

jrobie23 Aug 1, 2013 03:31 PM

I certainly will!

davidsteinmusic Sep 15, 2013 02:05 PM

I am trying to do the same thing and so was able to style the links via css.

I'm using the '&laquo; %link' for "newer posts" and the '%link &raquo;' for "older posts" in ATO>Next/Previous Navigation (for single post pages) and these are the css selectors i used to target the links and the carrats or the << and >>

I make no claims it's proper css or anything but it's working for me.....

div.older, div.older a:link, div.newer, div.newer a:link {

font-size: 95%;
font-weight: normal;
text-transform: uppercase;

}

I really would prefer to simply have the text "newer posts" and "older posts" and have them link to the next and previous posts respectively but after looking at the php file JD mentioned, i recognize that's out of my league.

If any one does find out how to sub the actual text of the post to whatever the desired text is, I'd love to know.

thanks, david

rickpoet Jul 30, 2015 11:54 AM

Hi,

Wondering if this issue every got cleared up. I have a new site here http://www.haikuniverse.com/ which displays a single post on the home page - when you click Previous at the bottom (Technically this is a multi-post page even though I have it set to only display one post) it's a live link which takes you to the previous post, also technically a multi-post page, and the "Next" link works fine there.

HOWEVER, when I view the actual posts (click on post title) as single post pages, the "Next" and "Previous" words are there, but they are not linked. I don't want to use the post title, (though when I do use that the links work on single post pages.) Is there a way to get the words "previous" and "next" on single post pages to actually be links?

Thanks!

Rick

lmilesw Jul 31, 2015 11:03 AM

Do you have all %link in the appropriate fields. For single post pages Next or Previous is not an option.

rickpoet Aug 1, 2015 01:21 PM

Thanks...is there a workaround...I don't have %link in those fields but I don't want to use the post title...more of a styling issue as we're using a large font for everything and the titles are too long to make that work. Is it possible to have just "Next" and "Previous" linked on single post pages through any code or css tweak?

Thanks,

Rick

p.s. I guess it wasn't clear in the ATA options that you couldn't use Next or Previous in single post pages (or perhaps I'm just not a very good reader.) Intuitively I think if you can use text such as "next" and "previous" in the navigation fields in other items in that area of ATA options it would make sense that you could use them on single post pages too? (I live in a fantasy world where everything is ideal.)

rickpoet Aug 1, 2015 01:25 PM

Ooh for that matter, for this particular website instead of trying to make that work, is it possible to still use the %link item for single post navigation, BUT tell it somewhere in the code to alter the behavior of that command...ie instead of having %link put in the post title automatically, have it use words we choose?

juggledad Aug 1, 2015 06:11 PM

You can edit the code to do this. Edit bfa_next_previous_links.php and change line 96 from
HTML Code:

                                next_post_link($bfa_ata['single_next_prev_newer'], '%title', TRUE);
to
HTML Code:

                                next_post_link($bfa_ata['single_next_prev_newer'], 'next', TRUE);
and change line 121 from
HTML Code:

                                previous_post_link($bfa_ata['single_next_prev_older'], '%title', TRUE);
to
HTML Code:

                                previous_post_link($bfa_ata['single_next_prev_older'], 'previous', TRUE);
This will change teh %link to next/previous.

remember to keep notes for you will have to do this again if you update the theme in the future.

rickpoet Aug 1, 2015 07:05 PM

OK, that really feels like it should work...but for some reason it's not. I've got the 2 lines in bfa_next_previous_links.php edited. I put %link in place for the Newer / Older post on SINGLE Post pages in ATA options. And just to be sure I deleted all caches. but it's still showing the actual titles of the next and previous posts.

Is there another place that defines what %link is that might need to be adjusted too?

Thanks!


All times are GMT -6. The time now is 08:42 PM.

Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.