WordPress-CMSing

WordPress by default is a blogging tool and works extremely well at it. After much debate the developers added the ability to create pages as well as posts, however WP isn’t built for advanced pages, it was only developed to say create an about page or contact page with simple text only.

Conventional ways of creating advanced pages in WordPress was to create all your XHTML/PHP/CSS in a template file and then create a page and link the two, this works, but you end up with loads of template files and editing them is a pain and not very manageable. Wouldn’t it be cool to create and edit pages the same way you do posts?

Well using this technique it is more than possible. First of all you need to add the following code to your Page Template file called “page.php”

<?php get_header(); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php edit_post_link('EDIT', '<p class="edit">', '</p>'); ?> <?php the_content(''); ?> <?php endwhile; endif; ?> <?php get_footer(); ?>

Next you need to download two plugins:

runPHP
Text Control

Activating both of these will then allow you to very easily add any code such as XHTML, CSS, PHP, JavaScript directly inside of the post box for your pages and will be executed as it should be.

ENJOY. XXX

Cameron “dRiZ” Drysdale
Founder & Creative Director of simplecandy.com

Post Revisions:

Stay up to date on WordPress news:

About the author:

Do you have your copy of The WPCandy Quarterly?

The Quarterly is our print magazine all about WordPress. It is released four times yearly (hence the name) and is filled to the brim with exclusive articles about WordPress, written by some of the brightest minds in the community.

Pre-order your issue today!

10 Responses to WordPress-CMSing

  1. Chip says:

    I think that WordPress is very appropriate for a CMS. With all the existant plugins and themes, and the flexibility of WordPress, it is fit to be used as full-option content management system.

  2. David says:

    Hmm, I am quite new to wordpress but I have found a plugin called tinymce-advanced. What is the difference between that gadget and the ‘hack’ above?

  3. Bram says:

    Now that’s handy!

  4. dRiZ says:

    @ David

    That plugin just adds more advanced features to the WP-Admin interface, such as giving you more control over certain things. What I talk about above isn’t a hack per-say, it’s just a way to let you manage content the way WordPress was designed to rather than via the Theme system when working with PHP and more advanced XHTML/CSS. Hope this answers your question. x

  5. Jenny says:

    I’ve known about this for a while and it’s a really good way to do it. That’s how I made my directory with WordPress. :)

  6. Johell says:

    I have an “edit” function at my site, and it’s very handy. I highly recommend this to anyone.

  7. Julian says:

    I have a questions: what’s the difference between runPHP and PHPExec?

  8. dRiZ says:

    @Julian

    As far as I can tell nothing much, I personally prefer runPHP as it has the best options IMO and has a good support.

  9. [...] WordPress-CMSing Conventional ways of creating advanced pages in WordPress was to create all your XHTML/PHP/CSS in a template file and then create a page and link the two, this works, but you end up with loads of template files and editing them is a pain and not very mana (tags: wordpress CMS design webdesign plugins php) [...]

Leave a Reply

Please note that WPCandy is a moderated community.

 

Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>