WordPress.org

Forums

Append trailing .html on posts (on the fly) (7 posts)

  1. parse
    Member
    Posted 4 years ago #

    I'm developing a plugin and I'm looking for a way to accomplish what the plugin ".html on pages" does, but for posts instead of pages.

    ".html on pages" source: http://plugins.svn.wordpress.org/html-on-pages/html-on-pages.php
    Plugin page: http://wordpress.org/extend/plugins/html-on-pages/

    The thing is that I really want to avoid changing the permalink structure, since it will just be in a specific theme that I need this permalink structure (a mobile theme that it switches to on-the-fly).

    Anyone got any clues for me how to accomplish this?

    Thanks in advance!

  2. venkatachari
    Member
    Posted 4 years ago #

    [code moderated]

  3. parse
    Member
    Posted 4 years ago #

    venkatachari: Hm, yes? That was the plugin I was talking about in my post. I want to add .html on posts without changing the permalinks under 'Settings', not pages.

    / Anders

  4. maxwellss
    Member
    Posted 4 years ago #

    Anders,

    I'm trying to accomplish the same thing, add .html to a post, but only one post.

    Did you find a resolution to your problem?

    thanks,

    Duncan

  5. merlinvicki
    Member
    Posted 4 years ago #

    >> add_filter('user_trailingslashit', 'no_page_slash',66,2);
    What does 66 and 2 stand for here? Are these post Id's? Can I add more here to exclude them from the .html extension?

  6. maxwellss
    Member
    Posted 4 years ago #

    Hi Merl,

    no, the numbers have nothing to do with post ids. They're to do with priority, and accepted arguments;

    http://codex.wordpress.org/Function_Reference/add_filter

  7. merlinvicki
    Member
    Posted 4 years ago #

    @venkat Hi, thanks for that, but I am still stuck with an issue. My blog page is "sitename.com/blog" and it keeps adding the extension and makes it "sitename.com/blog.htm/". Can you help me out with this?

Topic Closed

This topic has been closed to new replies.

About this Topic