• Resolved Corweb

    (@corweb)


    Hi forum,

    I’m trying to remove the date from the pages of my website, but I would like to keep the date, tags, … on my post overview page and single post.

    I’m using the Constructor theme.
    This is the website: http://www.cs-computers.be/new

    I’m looking in the page.php and I tried it by removing the code
    <?php if (get_constructor_option('content', 'date')) { the_date(); echo ' | '; } ?>

    Now, the date is removed from the pages and stays on the single posts.
    But it also disapears on the post overview page, which is called “Nieuws” on the website.

    Is there a way to keep the date on that post overview page?

    Thank you very much in advance code-wizards!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You might look at using CSS display:none based on the class you will find on the body element.

    Thread Starter Corweb

    (@corweb)

    Thanks @pkwooster.

    Still struggling. I can add display:none; to “article footer”, but then it will disappear on all pages. Also on the post overview page and single post.

    I will try to find a solution.

    If in the meantime anyone can help me, it would be very much appreciated!

    Is the posts overview page your blog page? odd that it would reference code on page.php. that should have no effect on your main posts loop. confusing.

    Thread Starter Corweb

    (@corweb)

    In reading settings in the dashboard I set it as follow:
    Front page displays: static page
    Front page: home
    post page: nieuws

    I’ve been trying to find a way to change the css as pkwooster wrote and I think I’ve found the/a solution.

    I used this code

    body.page-id-10 article footer {
    display:none;
    }

    And that removed the date etc, from the homepage. Now I’ll add the other page-id’s to css.

    yep, that should let you show the date on selected pages only, nice work!

    Thread Starter Corweb

    (@corweb)

    OK, adding a display:none for every page-id I wanted to exclude worked!
    Thanks!

    display none if my favorite tool:)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Remove date from pages only.’ is closed to new replies.