|
#1
May 22, 2011, 12:07 AM
|
|
I would like to use images as links for the next/previous navigation at the bottom of posts. I understand that Atahualpa calls wp_link_pages() to generate the navigation links, and it doesn't look like that function accepts any arg's except string values from the documentation. I can insert an image into the navigation, and it shows up, but I don't understand how to make the image into a link. (Or how to make anything other than %link work, for that matter)
In the options, it says "You can use single and double quotes, and HTML". Can anyone show me an example of the syntax to use something other than %link? I'd be happy with just an "arrow" that functioned as the link if I can't use an image, rather than a text based link.
As of now, anything other than the default %link does not create a link at all, just plain text
Thanks in advance,
Tim
Atahualpa 3.5.3
WP 3.1.2
http://www.reformationcomic.com/archives/114
Last edited by tnandrick; May 22, 2011 at 12:27 AM.
Reason: found addt'l info in forums after posting
|
#2
May 22, 2011, 04:52 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
did you look at the doc on the option page? where you can use '→' for a right arrow and '←' for a left arrow?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#3
May 22, 2011, 10:29 AM
|
|
Yes, I have. It does not make the arrow into a link, just a plain text arrow that does not link. The only way those options create a link is if I include %link.
If I input just "«" , "»" "→", or "←", when you go to the page and hover over the "link" the cursor changes to a text-editing cursor, not a link cursor.
Using only arrows work fine for the comments section, but the post navigation does not.
Last edited by tnandrick; May 22, 2011 at 11:25 AM.
Reason: more observations
|
#4
May 22, 2011, 11:37 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Hmmm, what brwoser? In safari on a mac it turns into the link cursor using Atahualpa 3.6.7
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#5
May 22, 2011, 11:41 AM
|
|
Looking at the source, it shows:
<div class="clearfix navigation-middle">
<div class="older-home">« </div><div class="home"><a href="http://www.reformationcomic.com/">Home</a></div><div class="newer-home"> »</div></div>
I'm using Firefox on a Mac
Last edited by tnandrick; May 22, 2011 at 11:42 AM.
Reason: reponding to mod.
|
#6
May 22, 2011, 11:48 AM
|
|
Same condition in Safari...
|
#7
May 22, 2011, 01:35 PM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
For Next/Previous links on single post pages that does indeed look like the way it works. I know of no way to change that without digging into the code.
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
#8
May 22, 2011, 02:21 PM
|
|
OK, so if I turned off the nav feature for single post pages in options, could insert some code below loop using get_adjacent_post to find next and previous posts, and use this as a nav feature, or is this not advised?
|
#9
May 22, 2011, 03:26 PM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
I am not sure and 3.6.7 doesn't have a "below the loop" section so you would have to edit one of the theme files.
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
#10
May 23, 2011, 03:48 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Atahualpa uses the WordPress Function 'previous_post_link()' to create the next/prev POSTS links.
and uses the WordPress Function 'previous_posts_link()' to create the next/prev PAGES links.
you can read about previous_ post_link
here
and you can read about previous_ posts_link
here
Neither routing allows for passing an image, they just return the text link
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#11
Sep 12, 2011, 01:29 AM
|
|
Is there any resolution on this? I'm coming up with the same issue, where any custom navigation text for a single post prev/next is just text. It only works for me using %link, and I'd like it to simply be the arrow without the post name.
|
#12
Sep 12, 2011, 07:03 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
You will have to edit the theme code bra_next_previous_links.php and change the call to the previous_post_link() function and next_post_link() function to pass a null for the 'link' parameter.
You should read up about the functions
http://codex.wordpress.org/Function_...next_post_link
http://codex.wordpress.org/Function_...ious_post_link
and make sure to document what you do because you will have to change it each upgrade of the theme
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#13
Sep 12, 2011, 07:41 AM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
Just for the heck of it I did a search on wordpress.org for "next previous images" and came up with this for posts and this for pages but perhaps you already checked there and discounted these for some reason. I just didn't want you to miss them if you hadn't.
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
#14
Sep 13, 2011, 01:33 AM
|
|
I looked at JD's links and it works for Previous but it's not taking for Next. Here's my code:
HTML Code:
if ($bfa_ata['next_prev_orientation'] == 'Older Left, Newer Right') {
if($bfa_ata['single_next_prev_same_cat'] == "Yes") {
previous_post_link('%link', 'Previous in category', TRUE);
} else {
previous_post_link($bfa_ata['single_next_prev_older']);
}
} else {
if($bfa_ata['single_next_prev_same_cat'] == "Yes") {
next_post_link('%link', 'Next in category', TRUE);
} else {
next_post_link($bfa_ata['single_next_prev_newer']);
}
}
All I've done is replace everything in the parentheses with ('%link', 'Previous in category', TRUE) and ('%link', 'Next post in category', TRUE). Is there something obvious I'm missing? The Previous one pops out the "Previous in category" syntax while the Next one displays the Atahualpa default.
|
#15
Sep 13, 2011, 06:48 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
You only made changes foe half the locations. Note they are in an 'IF' and you changed the 'TRUE' part, not the 'FALSE' part of the statement
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#16
Sep 13, 2011, 09:48 AM
|
|
I probably should have clarified that I've turned the "same post category" setting to yes. If that's the case, shouldn't I only update the TRUE settings? I'm not sure why the same syntax (basically) works for Previous but not for Next.
|
#17
Sep 13, 2011, 01:27 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
should, but it can't hurt to change both
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#18
Sep 13, 2011, 04:42 PM
|
|
Still not taking. Is there something buggy about the next_posts_link function or is it pretty straightforward?
I'd hoped to minimize text by not using post titles, but that might be the only workaround at this point.
|
#19
Sep 13, 2011, 06:38 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
there are two places lines 101-109 and lines 126-134 - did you change them both?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#20
Sep 13, 2011, 07:18 PM
|
|
That did it. Are there two spots, one for left navigation and one for right navigation? That would make sense.
|
|