Weitere ähnliche Inhalte
Mehr von Peter Baylies (8)
Kürzlich hochgeladen (20)
Add title shortcode
- 1. add_excerpt_shortcode.php 2011-11-06
<?php
/*
Plugin Name: Add Title Shortcode
Plugin URI: http://semperfiwebdesign.com/
Description: Adds an [add_title] shortcode for use with wordpress excerpts.
Version: 1.1
Author: Semper Fi Web Design
Author URI: http://semperfiwebdesign.com/
*/
if ( ! function_exists( 'sfwd_add_title_shortcode' ) ) {
function sfwd_add_title_shortcode($atts, $content='') {
if ($content) {
$title = $content;
} else {
$title = get_the_title();
}
return '<span class="add_title">'.$title.'</span>';
}
}
add_shortcode( 'add_title', 'sfwd_add_title_shortcode' );
?>
- 1/1 -