Tag Archives: Code

Code Snippets: Adding PHP Functions & Filters Without Editing Theme Functions File In WordPress

For customizing the default behavior of WordPress, webmasters either use plugins or insert hacks i.e. PHP functions and filters inside activated theme’s function.php file.

This works but when you insert any code without creating a child theme, it gets is automatically washed away in new updates.

Earlier we have discussed about creating child themes, we have also discussed about generating child theme with a user friendly wizard and there is a plugin that allows you to generate child theme of any theme in a click of a button.

Yes, you can easily insert custom PHP function in the functions.php file of your child theme but today in this lesson you will learn about a more easy way of inserting and activating PHP hacks directly from your admin area dashboard.

Continue reading Code Snippets: Adding PHP Functions & Filters Without Editing Theme Functions File In WordPress

How To Add Code Element TinyMCE In WordPress Visual Editor ?

Code element button is used for displaying code in programming language tutorials. Most bloggers use if for showing hacks and small code snippets inside their post content. By default code element button is present only on WordPress HTML editor, alternatively you many also use its tags and enclose your code using <code> and </code>. This tutorial explains you how to very easily add code element button both on WordPress visual and full screen editor.

First install and activate the new WordPress plugin called TinyMCE Code Element. After activation visit your admin area Dashboard -> Posts -> Add New and you will be seeing new <> sign button added to your visual editor.

Now simply select the code you have written inside your post and click the code element TinyMCE button as shown in the given screenshot.

Create Snippet Library Of Text, HTML Or PHP To Use In WordPress Posts Via Shortcodes

Post Snippets is a popular WordPress plugin that allows you to easily create a library of Text, HTML or PHP code touse inside your blog posts, pages and other custom post types etc. All created snippets can be used directly from WordPress Visual Editor using its button. You can as many snippets you want and even you can export and import them to you in other WordPress sites you own.

Continue reading Create Snippet Library Of Text, HTML Or PHP To Use In WordPress Posts Via Shortcodes