Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

[SOLVED] Using images in Next/Previous Navigation


  #1  
Old May 21, 2011, 11:07 PM
tnandrick
 
43 posts · Nov 2010
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 21, 2011 at 11:27 PM. Reason: found addt'l info in forums after posting
  #2  
Old May 22, 2011, 03:52 AM
juggledad's Avatar
juggledad
 
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  
Old May 22, 2011, 09:29 AM
tnandrick
 
43 posts · Nov 2010
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 10:25 AM. Reason: more observations
  #4  
Old May 22, 2011, 10:37 AM
juggledad's Avatar
juggledad
 
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  
Old May 22, 2011, 10:41 AM
tnandrick
 
43 posts · Nov 2010
Looking at the source, it shows:

<div class="clearfix navigation-middle">
<div class="older-home">&laquo; &nbsp;</div><div class="home"><a href="http://www.reformationcomic.com/">Home</a></div><div class="newer-home">&nbsp; &raquo;</div></div>

I'm using Firefox on a Mac

Last edited by tnandrick; May 22, 2011 at 10:42 AM. Reason: reponding to mod.
  #6  
Old May 22, 2011, 10:48 AM
tnandrick
 
43 posts · Nov 2010
Same condition in Safari...
  #7  
Old May 22, 2011, 12:35 PM
lmilesw's Avatar
lmilesw
 
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  
Old May 22, 2011, 01:21 PM
tnandrick
 
43 posts · Nov 2010
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  
Old May 22, 2011, 02:26 PM
lmilesw's Avatar
lmilesw
 
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  
Old May 23, 2011, 02:48 PM
juggledad's Avatar
juggledad
 
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  
Old Sep 12, 2011, 12:29 AM
bswb97
 
158 posts · Aug 2010
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  
Old Sep 12, 2011, 06:03 AM
juggledad's Avatar
juggledad
 
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  
Old Sep 12, 2011, 06:41 AM
lmilesw's Avatar
lmilesw
 
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  
Old Sep 13, 2011, 12:33 AM
bswb97
 
158 posts · Aug 2010
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  
Old Sep 13, 2011, 05:48 AM
juggledad's Avatar
juggledad
 
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  
Old Sep 13, 2011, 08:48 AM
bswb97
 
158 posts · Aug 2010
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  
Old Sep 13, 2011, 12:27 PM
juggledad's Avatar
juggledad
 
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  
Old Sep 13, 2011, 03:42 PM
bswb97
 
158 posts · Aug 2010
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  
Old Sep 13, 2011, 05:38 PM
juggledad's Avatar
juggledad
 
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  
Old Sep 13, 2011, 06:18 PM
bswb97
 
158 posts · Aug 2010
That did it. Are there two spots, one for left navigation and one for right navigation? That would make sense.

Bookmarks

Tags
center column navigation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Next/Previous Single Post Navigation samij0 Excerpts, Read more, Pagination 35 Aug 4, 2015 10:33 AM
Next/Previous navigation question lmilesw Excerpts, Read more, Pagination 5 Apr 9, 2010 11:05 PM
Filter next/previous navigation by category garyrw Post-Kicker, -Byline & -Footer 13 Jan 8, 2010 03:28 PM
next and previous navigation in the consulted category lkjc Page & Category Menu Bars 4 Jun 1, 2009 05:25 PM


All times are GMT -6. The time now is 07:33 AM.


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