• Hello,

    I’ve got a problem here..

    WordPress does some freaking ugly body class including that i would like to change.

    This:

    <body <?php body_class(); ?>>

    Ends up like this:

    <body class="page page-id-20 page-template page-template-page-300-php">

    This makes me very sad at the moment and i would like to delete the page class from only one page-template file. (portfolio.php)

    I’ve made a few different page templates like: 300 layout, 600 layout, portfolio layout, homepage layout, archive, search, 404 you name it.

    Now i’ve got this problem when viewing my site on a mobile device i would like to hide a column with images that aren’t very important to my layout to clear some space, but on my portfolio template this column with included images are indeed very !important! to display because thats my work stuff.
    How could i only hide the page body class from only my page template portfolio.php ?

    After that i could easily go inside my mobile divide stylesheet and hide the .page class like this:

    Mobile.css

    .page .column-2 { display: none; }

    Else i have to write 25 lines of CSS code to exclude all custom made templates files.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to delete .page class from body on one page template?’ is closed to new replies.