WordPress.org

Ready to get started?Download WordPress

Forums

"Killing" Page Category? (8 posts)

  1. PaulWeber
    Member
    Posted 8 years ago #

    I need to disable the Page Category being displayed at the bottom of my Pages.
    if you look at:
    http://www.huber-italia.net/blog/?page_id=6

    You will notice that at the bottom is says:
    Vi trovate qui - Tutte le news | Edit|

    When I wrote these pages I did not mention any category whatsoever - moreover there is no way to specify a given category when writing a page.
    Furthermore the link "Tutte le news" links back to to all posts in chronological order - which of course doesn't contain any *pages* as such (this is obviously confusing).

    How di I prevent the comment to show at the bottom of the page - or alternatively, how can I prevent Pages from being categorized at all?

    Thx...

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

    Look in the theme folder.
    You might have a 'page.php'
    If you do, open that and in there you will find the code that makes that at the bottom. The edit link will look like this:
    <?php edit_post_link(__('Edit This')); ?>
    so the other bit will be just before.
    If this doesn't work, post back :)

  3. PaulWeber
    Member
    Posted 8 years ago #

    Thank you.
    Actually if I remove that piece of code I will be preventing the comment from being (correctly) displayed on *Posts*.

    Just to recap:
    *Pages* are showing the comment on the bottom.

    This is either incorrect (as other threads have implied) and must be corrected (where?)
    or
    This is correct - but at this point I must find a way to caegorize properly *just for the Pages* and find my workaround to keep the comment hidden from view.

    I will add that I'm a total newb to WordPress and PHP 0_0 ...

    Thx again.

  4. PaulWeber
    Member
    Posted 8 years ago #

    Bump (I know it ain't polite, but the problm is persistent and causing some confusion).

    Thx

    PW

  5. e7
    Member
    Posted 8 years ago #

    BUMP!

    Can someone answer this?

    How can page categories be changed or disabled? I'm having a problem with this myself. I thought pages reside outside the loop and are not assigned to categories but on my website they seem to be. Because I have two themes running a main theme and a category specific theme, I'm running into problems with this.

    http://e7.shanky.com/

  6. moshu
    Member
    Posted 8 years ago #

    It is simple.
    Remove the_category tag from your Page template.
    For internal reasons Pages are always assigned to the default category, but practically you can conside Pages not having category. So, remove the tag!

    In any well-designed theme the Page template does NOT display the category.

  7. e7
    Member
    Posted 8 years ago #

    Thanks for the response,

    There is no the_category tag in my page.php file at all. I am using php to write in the header of my page and there is a statement there which reads:

    if(in_category(#){...do this... }

    Because apparently my pages belong to a default category which I want to be the default category for posts but NOT for pages I need a way to change the page categories.

    Pages DO have a category, if you change the default setting in the admin center and create a new page it will belong to the new category.

  8. e7
    Member
    Posted 8 years ago #

    Ok, the solution is rather simple. Add the following lines to the wp-admin/edit-page-form.php file in the right place:

    <fieldset id="categorydiv" class="dbx-box">
    <h3 class="dbx-handle"><?php _e('Categories') ?></h3>
    <div class="dbx-content">
    <p id="jaxcat">
    <div id="categorychecklist"><?php dropdown_categories(get_settings('default_category')); ?></div></div>
    </fieldset>

    This will give you the selection to choose a category for each page just like you do for posts.

    Good luck folks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.