Ein einfaches Plugin, um Permalinks im Editor verwenden zu können, wie es bestimmt schon tausend mal existiert:
Source
<?php
/*
Plugin Name: Permalink Shortcode
Plugin URI: https://sezz.at/projects/wordpress/permalink-shortcode
Description: Adds 2 new shortcodes: creates a link, only gets the permalink.
Version: 1.0
Author: Martin Karer
Author URI: https://sezz.at/
*/
function permalink_shortcode($atts) {
extract(shortcode_atts(array('id' => 1), $atts));
$url = get_permalink($id);
if ($url)
return '<a href="' . get_permalink($id) . '">' . get_the_title($id) . '</a>';
else
return false;
}
function permalinkurl_shortcode($atts) {
extract(shortcode_atts(array('id' => 1), $atts));
return get_permalink($id);
}
add_shortcode('permalink', 'permalink_shortcode');
add_shortcode('permalinkurl', 'permalinkurl_shortcode');
?>









