Timeline for Populate wordpress menu with link to custom field value (file download)
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 6, 2012 at 8:43 | vote | accept | Johan Dahl | ||
Mar 6, 2012 at 8:43 | comment | added | Johan Dahl | @songdogtech: I´m sorry about that I did not see where you check correct answers. But I see now, and I will do that. | |
Mar 5, 2012 at 20:37 | comment | added | markratledge | @Johan Dahl: You have a 0% answer acceptance rate; you should go back to your old questions and accept correct answers or submit your own answers. That's the way this site works. | |
Mar 5, 2012 at 18:12 | comment | added | Johan Dahl | It works now! Thank´s a ton =) The link should be somewhere in the middle, hehe. But it actually doesn´t matter that much and it needs to be easy to change because it´s not set in stone yet. So if it´s a complicated thing then I´ll just skip it! | |
Mar 5, 2012 at 17:03 | comment | added | sanchothefat |
@JohanDahl to change the order of the links you'd need to do some clever stuff with the $items string. Is it a simple case like putting it at the top or do you need in the middle somewhere?
|
|
Mar 5, 2012 at 16:59 | history | edited | sanchothefat | CC BY-SA 3.0 |
added 8 characters in body
|
Mar 5, 2012 at 16:59 | comment | added | sanchothefat |
@JohanDahl I updated the code example - you can pass any attachment ID into wp_get_attachment_url() and it'll give you the URL
|
|
Mar 5, 2012 at 16:54 | history | edited | sanchothefat | CC BY-SA 3.0 |
code update
|
Mar 5, 2012 at 16:27 | comment | added | Johan Dahl | That comment was not finished, sry for accidently posting it. It almost works now! This did add a link with the correct title, but the link is only /145. That is the ID of the attachment. I need to get the URL, but it should only be a slight change should it not? Also, if I might add another question. Is there a way to decide where in the menu this new li will be inserted? Thanks you. | |
Mar 5, 2012 at 16:16 | comment | added | Johan Dahl | Hmm, sadly that doesn´t display anything for me. | |
Mar 5, 2012 at 16:09 | history | answered | sanchothefat | CC BY-SA 3.0 |