Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • sgwood

    (@sgwood)

    Did either of you find a solution to this?
    I would really like to know if there is
    a way that WordPress did not always
    jump to the top when one clicks on
    an internal link.

    sgwood

    (@sgwood)

    Not sure, if this is on the same topic but I am
    trying to use polyglot rewrite as described in
    the polyglot.php, i.e.:
    RewriteRule ^(.*)/xx/?$ /$1?lp_lang_view=xx [QSA]

    I have added:
    RewriteRule ^(.*)/de/?$ /$1?lp_lang_view=de [QSA]e
    to my .htaccess.
    However it doesn’t seem to rewrite the ‘deutsch’ language link.

    I am using the standard Permalink Structure:
    /%year%/%monthnum%/úy%/%postname%/

    thanks for any help.

    brilliant! thankx

    Similiar problem here.
    i suspect that the search isn’t searching Pages.
    I have tested a clean 1.5 on different servers and the search
    seems to only return Posts and not Pages with the searched content.

    Forum: Fixing WordPress
    In reply to: Collapsable Menus

    on the subject of collapsable menus i have posted a workaround at:

    context aware sidebar
    https://www.ads-software.com/support/topic.php?id=27882#post-159785
    maybe it helps someone.

    thanks davidchait,

    i have used your function in the following code.

    <?php

    function is_page_or_subpage($id)
    { /* this can be used instead of is_page FOR PAGE ID TESTS ONLY */
    global $wp_query;

    if (! $wp_query->is_page) {
    return false;
    }

    if (empty($id)) {
    return true;
    }

    $page_obj = $wp_query->get_queried_object();
    if ($id == $page_obj->ID) {
    return true;
    }

    $pages = get_pages();
    foreach ($pages as $page) {
    if ($page->ID == $page_obj->ID /* found the page we're on */
    && $page->post_parent == $id) /* parent matched the passed ID! */
    return true;
    }

    return false;
    }

    ?>

    <!-- Pages Fruit -->
    <?php if(is_page_or_subpage(5)): ?>
    <a href='<?php echo get_settings('home');?>/fruit'>Fruit</a><br>
    <ul>
    <?php wp_list_pages('title_li=&exclude=2,3,4,6,7,8,9,10,11,12,13&sort_column=post_name&child_of=5' ); ?>
    </ul>
    <?php else : ?>
    <a href='<?php echo get_settings('home');?>/fruit'>Fruit</a><br>
    <ul>
    </ul>
    <?php endif; ?>

    <!-- Pages Animals -->
    <?php if(is_page_or_subpage(7)): ?>
    <a href='<?php echo get_settings('home');?>/animals'>Animals</a><br>
    <ul>
    <?php wp_list_pages('title_li=&exclude=2,3,4,5,6,8,9,10,11,12,13&sort_column=post_name&child_of=7' ); ?>
    </ul>
    <ul>
    </ul>
    <?php else : ?>
    <a href='<?php echo get_settings('home');?>/animals'>Animals</a><br>
    <ul>
    </ul>
    <?php endif; ?>

    How to:

    Just paste the above code into your sidebar.php

    In the above example, page “Fruit” has the ID 5.

    Add the ID in:

    1) is_page_or_subpage(5)
    2) child_of=5

    Add exclude IDs:

    Here one enters the
    exclude=2,3,4,6,7,8,9,10,11,12,13

    Notice in this example that the 5 is not in the “exclude” list.

    Add the Links:

    The links are hardcoded URLs. It would be naturally
    more elegant if these URLs could be created from the ID
    but my knowledge of the WordPress system isn’t that great.

    repeat for Pages Animals, etc.

    this works very well for me. of course the top level (parent pages) need to be
    hard coded, as in the above example however the children pages will be
    dynamically displayed. this would work fine for a simple CMS site.
    I guess this only works for a two level hierachy though.
    thought this might help someone out there.

    steven

    ps. i have added this post into a text file at:
    https://www.fluxmedia.de/images/WP_collapsable.txt
    because this post seems to clip the length on some of the code lines.

    Hi motoed,

    no, i don’t have to update the .htaccess every time. I am creating pages
    and i don’t have to update the .htaccess file.
    in fact, i checked the modified time on the .htaccess and then checked it again after creating a new page. the modified time remained the same.
    so the .htaccess wasn’t updated after each new page.

    in case it ain’t clear, i don’t have an .htaccess in the root, only the one that created in the wordpress folder.

    zpao, i would suggest that you:
    – delete all of your pages
    – delete any .htaccess files you have in root and in the wordpress folder
    – create a new .htaccess in the permanlink page with the structure
    /%year%/%monthnum%/%day%/%postname%/
    – copy the new .htaccess into the wordpress folder
    – create a new page

    see if this works

    oh, and don’t forget to chmod your .htaccess in your
    Wordpress folder 666

    s

    ok, i have solved the problem.
    wordpress is writing the .htaccess in the root
    directory but would seem to be reading from
    the wordpress folder.

    i did a copy all (ctrl+a) of the .htaccess generated in the
    “Permalink” page. Created the .htaccess file local and copied
    it into the WordPress folder. works!

    i’m using the standard “/%year%/%monthnum%/%day%/%postname%/”
    structure.

    s

    Mmm. i have tried that as well , but no luck. Just get 404 pages.

    looks like it’s a common problem with the 1.5

    Steven

    system:
    [Apache/1.3.31 (Unix) mod_python/2.7.10 Python/2.2.2 mod_gzip/1.3.26.1a mod_webapp/1.2.0-dev mod_perl/1.29 mod_throttle/3.1.2 PHP/4.3.10 FrontPage/5.0.2.2510 mod_ssl/2.8.18 OpenSSL/0.9.7d]

    structure:
    /%year%/%monthnum%/%day%/%postname%/

Viewing 10 replies - 1 through 10 (of 10 total)