RT @G2Thijs: GIVEAWAY TIME! 🔥5x the new Forged in the Barrens expansion bundle provided by Blizzard including:- 60 New Expansion Packs… (MAR18/10:49)

Permalink ShortCode

Ein einfaches Plugin, um Permalinks im Editor verwenden zu können, wie es bestimmt schon tausend mal existiert:


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>';
		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');


OCT1/20:46 - iTunes plays:
The Prodigy - Wild Frontier

Kontakt Impressum Martin Karer 2008-2022