Forums

[resolved] Removal of "Filed under:" for certain pages (3 posts)

  1. fakelvis
    Member
    Posted 5 years ago #

    Hi all,

    I currently have multiple pages attached to my wordpress blog such as Contact, Links, Projects, etc. Currently these are hand-coded and I want to migrate them into WordPress as WP 'Pages'.

    I've now done this with a couple and to make them look the same as when they were hand coded I now need to remove two things from them...

    1) The "Comments are closed" text [resolved]
    2) The "Filed under" text

    I removed the 'Comments are closed' text by simply editing the comments.php file in the theme manager as I don't want this text to appear on any page/post if comments are closed.

    the problem is the second one though. I know I can edit this in the theme pages too (index.php) but the problem is I want this text on my blog posts, just not my pages.

    Is this possible?

    Sorry for the size... I have brevity issues.

    Thanks

  2. moshu
    Member
    Posted 5 years ago #

    Wrong approach - editing the comments.php file.
    You should create Page temnplates for your Pages - where you edit out/delete all the code you don't need for Pages.
    http://codex.wordpress.org/Pages#Page_Templates

    About the cause of your problem: see Template Hierarchy
    http://codex.wordpress.org/Template_Hierarchy

  3. fakelvis
    Member
    Posted 5 years ago #

    Ah brilliant.

    Thank you very much.

    I always thought there might have been an easier way but wasn't sure.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags