If you only need one link, then it’s proberly better to just use something else… seems a waste to call the function only to output a single link.
<a href="<?php echo get_permalink(83) ?>"><?php echo get_the_title(83); ?></a>
Heh. I knew there was a simpler solution to this booger! It just wasn’t obvious enough to me. Thank you very much!
Though… I have to use this on a multilingual WP instance. I’m using ZdMultiLang plugin and the get_permalink(83) doesn’t display the translated title. Any idea?
What functions do you have available for you to translate the text?
Uf, I have no idea what functions there are available for translation. I’ve activated the plug-in and it seems to work. When I use wp_get_categories(‘include=15&list_li=&style=none’) it displays the translated name of the category.
What the ZdMultiLang plug-in does, at least what I’ve noticed on the high level, is the URL rewrite where it inserts /en/ or /sl/ right after the domain and before the rest of the permalink. And I guess the apply_filters then somehow retrieves the correct language instance of the category name/title. But this doesn’t work with pages.
Tnx for your help.
Rather then me sifting through plugin code to figure how the plugin handles translating text, i’d suggest having a chat with the plugin author, you can even give the above code as an example.
I don’t use any language related functions to know the correct procedure, nor am i familiar with the above plugin, else i’d happily post how to do it.
Sorry i couldn’t be more help, i did check the plugin’s instructions and couldn’t find anything useful there.
No worries. You’ve been a great help.
When I figure out the best solution to this problem I will try and remember to post it here.
Happy wpressin’!