How to hide template files from WordPress Appearance File Editor

Often when developing a WordPress theme, you will add template files to allow certain functionality on the site. If these files are listed in the themes main folder, wp-content/themes/theme-name/template-file.php for example, they will show in the WordPress File Editor in the WordPress Admin Panel under Appearance > Editor. Also, if these files are listed inside a folder at the theme directory file level, wp-content/themes/theme-name/templates/template-file.php for example, they will show in the Editor as well. This means that these template files will be editable through the WordPress Admin Panel and can be easily changed there without having to use a Host File Manager or by using FTP.

As you may know, if you make a small mistake in a php file, even something as small as an extra semicolon, it can possibly break the entire WordPress site and display a php error code when visitors try to visit the site instead of the regular site itself. It can also break the site to where you cannot even access the WordPress Admin Panel to fix the problem. If there will be people managing the site that are not experienced with PHP coding, you may not want to have certain php files accessible through the WordPress File Appearance Editor. In order to hide certain php files from the WordPress Appearance File Editor, you will need to put those files at least 2 folders deep from the theme directory file level. An example of this would be: wp-content/themes/theme-name/templates/hidden/template-file.php.

I hope this WordPress Tip helps you with securing certain template files from easy editing. Enjoy!

How to add a page or link to your WordPress Navigation Menu

If you are using WordPress, you may want to add a new page or link to your WordPress menu. Just follow these steps below to add a page or link to your WordPress navigation menu.

  1. From WordPress Admin Menu, click on Appearance > Menu
  2. From here on left side of page, find pages box(or links)
  3. Click View All or add custom link if doing a link
  4. Find page you want to Add to menu
  5. Click check box next to page you want added
  6. Move new link to where you want it in the menu and be sure to hit Save Menu

There you go, your new menu item should now be in your WordPress menu. Hope this helps with your WordPress problem, enjoy.

How to change comment is awaiting moderation text in StudioPress Genesis

If your site allows comments, you may want to set it up to where you have to approve comments before they appear on the site. When this setting is enabled, commenters see a message after posting a comment telling them that their comment is awaiting moderation. You can change that comment awaiting moderation message text in StudioPress Genesis. Just add this WordPress Code Snippet to the functions.php file in your current WordPress theme in order to change the comment is awaiting moderation text to a custom message.
[Read more…]