The MU forums have moved to WordPress.org

Pages not working in wpmu (3 posts)

  1. NetAndif
    Inactive
    Posted 18 years ago #

    I've installed several wpmu snapshots,
    but nowhere i could get the pages function running.

    Here is a install of the latest one from donncha:

    http://wpmu.agunda.net/wpmu-2005-05-03/

    I've got the pages to work on my own blogsite,
    but the syntax is different.
    Could it be, that for the new pages functionality there must be included an entry to the .htaccess or is it simply buggy?

  2. NetAndif
    Inactive
    Posted 18 years ago #

    template-functions-links.php:

    function get_page_link($id = false) {
    global $post, $wp_rewrite;

    if (! $id) {
    $id = $post->ID;
    }

    $pagestruct = $wp_rewrite->get_page_permastruct();

    if ('' != $pagestruct) {
    $link = get_page_uri($id);
    $link = str_replace('%pagename%', $link, $pagestruct);
    $link = get_settings('siteurl') . "/$link/";
    } else {
    $link = get_settings('siteurl') . "/?page_id=$id";
    }

    return apply_filters('page_link', $link, $id);
    }

    i've replace get_settings('home') with get_settings('siteurl')
    But the pages functions does'nt work though.
    I'm definately sure, this is a rewrite problem.

    If you comment out the following way:

    function get_page_link($id = false) {
    global $post, $wp_rewrite;

    if (! $id) {
    $id = $post->ID;
    }

    $pagestruct = $wp_rewrite->get_page_permastruct();

    // if ('' != $pagestruct) {
    // $link = get_page_uri($id);
    // $link = str_replace('%pagename%', $link, $pagestruct);
    // $link = get_settings('siteurl') . "/$link/";
    // } else {

    $link = get_settings('siteurl') . "/?page_id=$id";

    // }

    return apply_filters('page_link', $link, $id);
    }

    it returns the old semantic of page links.

    Why did this change?

    What does this line mean:
    $pagestruct = $wp_rewrite->get_page_permastruct();

    Does'nt someone else like to get the pages working??

  3. NetAndif
    Inactive
    Posted 18 years ago #

    See the pages working, using the 'index.php' variant here:

    http://wpmu.agunda.net/wpmu-2005-05-03/

    You will only have uncomment as described above.
    Don't forget to clear your smarty-cache after the change.

    Any suggestions from anyone?

About this Topic

  • Started 2025 years ago by NetAndif
  • Latest reply from NetAndif