![]() |
wordpress question: calling in the_permalink in post content?
Say I want a link within my content to link to
Code:
<?php the_permalink() ?> Code:
<a href="<?php the_permalink() ?>"> |
dont know why you want too, but you could create a shortcode to do it, or via a plugin.
http://justintadlock.com/archives/20...rdpress-plugin |
I am working on a script which automates my content creation for certain projects. All the post data is written into an XML file for importing into wordpress after it's creation. In my post template I would like to link an image from the excerpt into the single.php version of the_content. If you follow?
|
heres a few others to look at
http://justintadlock.com/archives/20...rdpress-plugin http://wordpress.org/extend/plugins/rb-internal-links/ or some code to do it via your functions.php file Code:
function print_link($atts, $content = null) { Code:
[mypermalink]title you want[/mypermalink] |
Quote:
|
you could probably modify it to work with excerpt as well, probably just 1 line of code to add the filter for excerpt as well as the_content
|
Quote:
Code:
add_filter('the_excerpt', 'do_shortcode'); |
from one headache to the next. now i'm having trouble gettign the_excerpt to import from my XML file. The post imports fine, but the excerpt is left hanging :( Don't suppose you got much experience with creating XMLs for import do ya fris?
|
All times are GMT -7. The time now is 05:07 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123