• Resolved owl

    (@owl)


    Hi

    I have a problem with setting one of my Pages so that it looks bit different than the others.

    I know I should edit page.php. There’s a fragment of code I need to edit: <div id=”content” class=”narrowcolumn”>.

    What I want to do is: IF page id is 54 THEN the code above should change to <div id=”content” class=”widecolumn”>.

    I was trying to use that:
    <div id=”content” class=”<?php if ($page_id == “54”) { echo (“widecolumn”); } else { echo (“narrowcolumn”); }; ?>”>

    Thing is it doesn’t work. Is page id handled some other way? Or possibly this code is just wrong? As I don’t know PHP almost at all I’d be grateful if anyone could give me a cut and paste solution.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Different layouts for different Pages (php question)’ is closed to new replies.