Forums

[resolved] Changing comment-page-# (5 posts)

  1. larsbachmann
    Member
    Posted 2 years ago #

    Hi WordPress fans

    I'm trying to tweak WordPress, to use it as a directory using the comments.

    But my problem is that i want to change the URL to page-1, page-2 instead of comment-page-1, comment-page-2 etc.

    Can anyone tell me how to fix this?
    Thanks

    Lars Bachmann

  2. hhberthelsen
    Member
    Posted 2 years ago #

    It's not advisable, but if you do a core hack, you can search in all files, where "comment-page" is mentioned. The search can easily be done with grep, like: grep -ir "comment-page" *

    A plugin would be the right way to do it ... sorry, I'm not a plugin developer

    ... for a hammer, everything is a nail

  3. Lars Koudal
    Member
    Posted 2 years ago #

    I am a developer, so I would be happy to create a plugin, I just have no clue (I searched) which functionality WordPress provides for me to manipulate the URL and change "comment-page".

  4. larsbachmann
    Member
    Posted 2 years ago #

    Problem solved :)

    With a little help from hhbertelsen i manage to find 4 files in the wp-includes folder.

    wp-includes/comment-template.php
    wp-includes/rewrite.php
    wp-includes/link-template.php
    wp-includes/canonical.php

    I changes comment-page to something else in these 4 files, and it works.

    Thx
    Lars Bachmann
    http://www.larsbachmann.dk

  5. Lars Koudal
    Member
    Posted 2 years ago #

    Problem solved? By hacking core-files.. Okay, I can see I need to put this on my to-do list to research a solution. If anyone has one already, that does not involve hacking the core-files, please.. don't hold back :-)

    Lars Koudal
    http://www.mywordpress.com

Topic Closed

This topic has been closed to new replies.

About this Topic