If you’re a true believer in landing pages, you might like to try using your landing page template on some of your single posts.
The only problem is, there’s no Page Attributes box on the Edit screen of single posts so you can’t select it.
1. You could install a plugin which adds the Page Attributes meta box and then modify your page_landing.php file to work on posts.
2. You can simply add a custom function in your child theme which is far more flexible.
Here’s an example of what the 2nd solution produces:
Here’s the code you can paste at the end of your child themes functions file and modify.
The above code also removes the comment form. To remove any footer entry meta for category tags or author box you can use CSS if your theme doesn’t include hooks for these.
You can use the code above or this code below which also removes the author box and entry meta from the footer.
- Both code snippets enable you to change the file name of your page template to match your own meaning you can also you use this code for any page template.
- Includes an array with a post I.D and post slug meaning you can add more single posts to the array separated by comma’s.
- Conditional tag can be changed as well.
- Tested on the Executive Pro theme by StudioPress
Leave a Reply
You must be logged in to post a comment.