• How can I create “static” pages that are edited by WordPress (and searched with the search engine)? For instance, for an /about/ section…
    In TextPattern I would create a new section and a template, and the “page” would consist of a single post that I could edit to make changes…
    Also, if possible I would want to exclude this from the RSS feeds!

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter fncll

    (@fncll)

    Thanks. Wiki plug pages aren’t included in the WP Search, as far as I can tell by testing on the site, so that’s useless to me.
    The first suggestion follows along the lines of what I am already working on, I think, but I can’t get the sample pages to see them and can’t tell if they are included in the search.
    But there has to be a simpler way– if someone hasn’t written a plugin for this kind of need, I guess I’ll probably do so.

    Thread Starter fncll

    (@fncll)

    The other disadvantage of method #1 is that it makes a static copy of the menu, which will have to be updated every time this information changes. The good thing about Txp sections is that they are in every way a part of the site and integrated so that the only updates you have to make manually are to the content. Thanks for the pointers, though.

    fncll — not really…. if you <del>follow</del> read the instructions, you’ll see that I pulled it out into it’s own file (menu.php) which I then include both in my main index.php and the static php pages. It’s klunky, but it works for me and helps me to keep my index.php file down to a managable size too.
    And yes, since they are static pages outside of WP, they wouldn’t be included as part of the search capabilities. A drawback, but until a better solution comes along, I’ll live wiht it.
    TG

    Thread Starter fncll

    (@fncll)

    Ah, I didn’t see that– I was assuming that the include menu file wouldn’t be updated by WordPress.
    However, it looks like the “fake folders” plugin might do what I need. I’m going to check it out more and I’ll let you know.
    Having a search of the other pages is not a drawback or an inconvenience for me– it is an absolute requirement. I’m *not* going to give user’s two search engines to look for content!

    fwiw, i’d love to see a plugin specifically for static pages. this functionality would allow me to use wordpress as a simple but real cms instead of just a blogging tool.

    A little idea i got:
    If you create a page, much like TechGnome’s static “shell.php” where you make a call to a single wp-post (that is possible via the id or something I guess) but in the shell.php page remove all sort of calls to date, comments and the other stuff you wouldn’t like in a static page.
    Wouldn’t that create a static page that is searchable within WP (all posts are?) and editable via the admin interface?

    fncll – I see your point, but it also depends on your needs. In my case, I had an “About Me” as a static page, along with a “Comment Leaders,” “Recent Comments,” and a “More Links” pages. The last three actually use WP calls to generate their content, but I can’t put that kind of code into a post as it would never get run. In addition, I didn’t want the content of those pages searchable, since it didn’t make sense.
    It was a solution mainly for me, and I simply offered it as a possible solution to others.
    Tinwelint – in a nutshell, yes.
    TG

    But I don’t know how to do it 🙂 . Anyhow I think I will use your (TechGnome’s) static page method as I don’t care wheter my page is searchable or WP-editable (a kind of about me page only).

    Inserted Pages
    I haven’t yet had time to try it out, but it sounds promising, and if it works, is probably just what i’ve been looking for – “static” pages that are normal posts within wordpress which can be edited and controled as such. Not sure if it fills your search engine requirement though.
    You should probably take a look at the rest of the article since that Inserted Pages section leans on some other sections, and there is also a screenshot that illustrates the new Post Status options in the Edit Post screen.

    Thread Starter fncll

    (@fncll)

    TechGnome– I hope I didn’t sound ungrateful for your help– I was and am! It just so happens that at the moment I need the content searchable. Thanks again for your advice!

    Thread Starter fncll

    (@fncll)

    My posts keep disappearing for some reason…

    fncll – no offence taken, and I never thought you sounded ungrateful. I jsut wanted to make clear up front that the content isn’t searchable. I’ve had people try to implement it, *then* think about the content rather than the other way around. This method works for me since it allows my to run PHP through it, which I cannot do in posts.
    TG

    Just a thought…
    Couldn’t you create static pages with htaccess? Theoretically, you can create a rule that assigns a specific post number to a url.

    Phoat – yep, you could, in fact I’ve done some prelim work on some thing to do just that…. the problem is in getting it to NOT show up on the main page when you first enter the post. I’ve thought about backdating it, but that’s kind of hokey.
    If anyone is interested, here’s what I added to my htaccess file:
    RewriteRule ^static/(.*) /index.php?name=$1 [QSA]
    Now, I can do links like this:
    ht<b></b>tp://techgnom<b></b>e.anderson-website.net/static/about-me
    And it would take me to the post titled “About Me” (if I had one).
    I’m trying to figure out a way to sort of automate this via a plugin and a function that would list all “static” posts, and since they are posts, they are 100% searchable. The only thing I haven’t done with it yet it to add the capability to run PHP in the post – which is one of the things I use static pages for, to generate the Recent Comments, Comment Leaders, and my Great List o’ Links.
    TG

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Static Pages’ is closed to new replies.