Member
Member
slaattnes   2009-09-17, 01:08
#1
Hi

How can I get the current news link in a link like this:

`<a href=”http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>” title=”Click to share this post on Twitter”>Share on Twitter</a>`

It's the `<?php the_permalink(); ?>` I dont get. I've tried all sorts of variations and I've read throug the documentation, but I can't get it right. getNewsLink, getNewsAlbumURL... and so on.

Someone please help:-)
Member
Member
slaattnes   2009-09-17, 02:13
#2
I found a dirty solution:

`<a href=”http://twitter.com/home?status=Currently reading http://mydomain.com/news/<?php echo getNewsTitleLink(); ?>” title=”Click to share this post on Twitter”>Share on Twitter</a>`
Administrator
Administrator
acrylian   2009-09-17, 08:30
#3
`<?php the_permalink(); ?>` is a Wordpress function anyway....

There are several ways to do this:
`getNewsURL(<titlelink of the news articles>)` (if in news context you can get the titlelink with `$_zp_current_zenpage_news->getTitlelink()`)

Or by combining: `echo getNewsBaseURL()."/".getNewsTitlelink()`.

Probably indeed a good idea to have a function for the full link, I will add that for the next version.
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.