Warning: Use of undefined constant TWITTER_CONSUMER_KEY - assumed 'TWITTER_CONSUMER_KEY' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 9

Warning: Use of undefined constant TWITTER_CONSUMER_SECRET - assumed 'TWITTER_CONSUMER_SECRET' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 10

Warning: Use of undefined constant TWITTER_ACCESS_TOKEN - assumed 'TWITTER_ACCESS_TOKEN' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 11

Warning: Use of undefined constant TWITTER_ACCESS_TOKEN_SECRET - assumed 'TWITTER_ACCESS_TOKEN_SECRET' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 12

Warning: Use of undefined constant USE_COLLAPSIBLE - assumed 'USE_COLLAPSIBLE' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 14

Warning: Use of undefined constant USE_MULTILINGUAL - assumed 'USE_MULTILINGUAL' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 15

Warning: Use of undefined constant THEME_BODY_WIDTH - assumed 'THEME_BODY_WIDTH' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 16

Warning: Use of undefined constant THEME_COMMENT_THREADED - assumed 'THEME_COMMENT_THREADED' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 17

Warning: Use of undefined constant EDITOR_INLINE_STYLES - assumed 'EDITOR_INLINE_STYLES' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 18

Warning: Use of undefined constant SUPPORT_MENU - assumed 'SUPPORT_MENU' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 19

Warning: Use of undefined constant SUPPORT_THUMBNAIL - assumed 'SUPPORT_THUMBNAIL' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 20

Warning: Use of undefined constant THUMBNAIL_WIDTH - assumed 'THUMBNAIL_WIDTH' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 21

Warning: Use of undefined constant THUMBNAIL_HEIGHT - assumed 'THUMBNAIL_HEIGHT' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 22

Warning: Use of undefined constant DISABLE_PINGTRACKBACK - assumed 'DISABLE_PINGTRACKBACK' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/functions.php on line 24
Enable Shortcode in WordPress’ Widgets and Comments | Hikaru {Aka} Yuuki のブログ
Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/header.php on line 9

Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/header.php on line 25
 


Enable Shortcode in WordPress’ Widgets and Comments

Posted in: Programming @en,Web Design |

This post is also available in: Indonesian

shortcode

This post is also available in: Indonesian

Sometimes we need to use shortcodes in the widgets or comments. One example of using shortcode in the Widget is to create a different style to specific word in the Widget Title, by putting the word in the span tag. This span then later given a different style via CSS. Example is below.

Shortcode di Widget

To enable shortcode in Widgets, add lines below in file function.php inside your theme folder.

add_filter('widget_title', 'do_shortcode');
add_filter('widget_text', 'do_shortcode');

Shortcode di Comment

While to enable in comments, add line below.

add_filter('comment_text', 'do_shortcode');



Comments

There is one comment


  1. DSLR-A850 says:

    Banyak terima kasih untuk mengembangkan usaha untuk membahas ini , saya merasa kuat tentang hal ini dan seperti mempelajari lebih banyak mengenai hal ini . Jika layak , karena Anda mendapatkan keahlian , maukah kau memperbarui halaman Web Anda memiliki banyak jauh lebih info? Hal ini sangat bermanfaat bagi saya .



Speak Up!

Leave your own comment

ERROR: si-captcha.php plugin says GD image support not detected in PHP!

Contact your web host and ask them why GD image support is not enabled for PHP.

ERROR: si-captcha.php plugin says imagepng function not detected in PHP!

Contact your web host and ask them why imagepng function is not enabled for PHP.

Notify me of follow-up comments via e-mail (or subscribe here).




 

Share

Subscribe Feed

Email

Facebook

Twitter

Delicious

Digg

StumbleUpon

Google Buzz

Deviantart



Warning: Use of undefined constant scripts - assumed 'scripts' (this will throw an Error in a future version of PHP) in /home/hikaruyu/public_html/wp-content/themes/hikaruyuuki/library/functions/scripts.php on line 50