Works Fantastic. Here Sum TIps
-
This is a wonderful little time saving plug-in. However, it’s really intended for folks who know a little PHP coding. If you use Advanced Custom Fields, this is a gem. If you don’t use Advanced Custom Fields, you should. It is so awesome. Once you climb the learning curve, you’ll be amazed at how quickly you can develop complete, custom and eye catching WordPress Themes and Templates. Anyway, I digress.
The documentation isn’t really “bad” so much as it assumes the end user knows his way around WordPress. In addition, there is some code in the plugin that needs to be changed as it is deprecated. It’s mentioned in other posts here. I’ll get to all of it.
To get this to work, follow these steps:
–> Step 1
First, you need to update the plugin code as explained by super powered in an earlier post. It’s easy. Takes seconds. You can install the plug-in and edit these lines in the Admin panel.
…………………
From super powered —But if your using WordPress 4.1 youll need to change 3 lines of code in the plugin file, since get_themes() & get_current_themes() were both depricated.
It’s rather simple:
wp_content>plugins>wp-custom-post-template>wp-custom-post-template.php
On lines 85, 86 & 87 change:
$themes = get_themes();
$theme = get_current_theme();
$templates = $themes[$theme][‘Template Files’];to:
$themes = wp_get_themes();
$theme = wp_get_theme();
$templates = $theme[‘Template Files’];—————————-
–> Step 2
You need to create a new template page with the WP Post Template: tag and upload it to the ROOT of your THEME FOLDER.
Template tag has the following format:
<?php
/* WP Post Template: Name of New Template */
?>
Note that “WP Post Template” must proceed the name of your new template.
–> Step 3
Create your new template layout. This is where you need some skills. I might be nice and write a little tutorial about all this if anyone expresses interest.
–> Step 4
Name and save your new template page. I name my post template pages sort of like this — “Post_Template_for_Events.php ” and upload it to the ROOT of your Theme Folder. This is probably what is confusing most folks. You can tweak the code to specify a new theme folder for your posts. But, I won’t get into that. However, I do like to keep things tidy and everything in it’s place.
–> Step 5
Now you should see the new template in the drop down.
Little Starter Page Example Below.
——————————–
<?php
/* WP Post Template: My Custom Template Name */
?>
<?php get_header(CustomHeader); ?>…. Your layout Here ….
<?php get_footer(CustomFooter); ?>
———————
Hope this makes sense to someone.
Showing some love from New Orleans
Mark
———————————-
- The topic ‘Works Fantastic. Here Sum TIps’ is closed to new replies.