Create Custom WordPress Includes

Another challenge I had when creating the WordPress theme for Rose Edge LLC was that I needed to create a couple of custom includes, and I didn’t know how to do that. I needed a space on the sidebar where Kristin could update her Upcoming Event area. I didn’t want to have to teach her how to go into the backend code and edit sidebar.php. Also, I needed a way for her to edit the “Insight Flash” that appears on her home page. I had already found a way to use the Excerpt as a secondary source of content – I needed another solution.

Enter the Improved Include Page plugn

The Improved Include Page plugin allows you to include the content of a static page in a template file. Once installed you simply create a new page, save it, and note the page number. and then call to that page anywhere in your template. For instance, if your page was #21 your call would look like this: <?php iinclude_page(21); ?>. And that’s all there is to it!

I created two pages for Rose Edge – one called “Edit Next Event” and one called “Edit Insight Flash” (I used Edit as the first word in the title so that any pages being used in this way would group together and be easily recognizable.)

3 Responses to “Create Custom WordPress Includes”

  • Whit Says:

    I appreciate you posting this, it’s helping me with an identical scenario (and for a life coach to boot!). But one thing I’m unclear on is how you setup those “edit” pages to not be represented on the site itself. The only way I’ve been able to have my include page be available *and* not represented in the menu bar of the site is to have a blank title, which is kludgy at best. Making it private causes it to vanish from the page. Can you tell me how to keep the title from within the Dashboard but omit it from the site itself?


  • Sheriar Designs Says:

    Hi Whit,

    Hmmm … it’s been a while since I did this so I couldn’t remember off the top of my head. I logged into the site and see that I have those pages set as private, and published. They show up in the admin list but not in the navigation.

    Hope this helps,

  • Whit Says:

    Damn, that’s weird – I’ve tried that already, just set it that way to be sure. The content vanishes when I have it set to private/published. I don’t know what else to try. I’m contacting the plugin developer about it, though.