Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)
  • I am also very interested in knowing when this feature will be added.

    Thread Starter phil404

    (@phil404)

    Robert,

    If you’re ever in Montreal, I would like to buy you a beer or two. I had no idea wp_reset_query() existed.

    Many thanks!

    -phil

    To place the Multilingual Press Language Switcher widget in the header of your theme, follow these steps:

    1) Register a new sidebar widget region
    Place the following code in your functions.php:

    ///////////////////////////////////////
    // Create a widget region for the
    // Multilingual Press lang switcher
    ///////////////////////////////////////
    if ( function_exists('register_sidebar') ) {
    	register_sidebar(array(
    		'name' => 'Language Switcher',
    		'id' => 'language-switcher',
    		'before_widget' => '<div>',
    		'after_widget' => '</div>'
    	));
    }

    With this code in place, you will now see a new widget region in the Appearance / Widgets area of the admin, called Language Switcher. Drag the Multilingual Press Widget into this new widget region.

    2) Display the language switcher in your theme’s header
    Place the following code in your <header>, usually found in header.php:

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Language Switcher') ) : ?><?php endif; ?>

    Now, all that remains is to style the language switcher as needed.

    Thread Starter phil404

    (@phil404)

    Ok, I have found the problem. When using query_posts() replaces the pagename=foo property from the query string, which is required in order to preserve the relationship between the translated pages. Adding pagename=team to my query_posts() query solves the problem of the broken language switcher link, but creates a new problem: no posts are returned from my query. This makes perfect sense, as no posts will contain the property pagename.

    Help. ??

    -phil

    Thread Starter phil404

    (@phil404)

    Resolved with WP 3.0.1.

    Forum: Fixing WordPress
    In reply to: nextpage tag
    Thread Starter phil404

    (@phil404)

    After even more experimentation, it seems my last post is not accurate.

    The nextpage tag works fine with the following permalink structure:

    /%category%/%year%/%monthnum%/%postname%/

    …unless the post belongs to a child category.

    So, a URL of structure:

    /parent_category/child_category/year/monthnum/postname/

    will not paginate.

    Forum: Fixing WordPress
    In reply to: nextpage tag
    Thread Starter phil404

    (@phil404)

    After a bit of experimentation, I have discovered that the nextpage rewriting bug is only present when %category% is included in the permalink structure.

    nextpage works with this permalink structure:
    /%year%/%monthnum%/%postname%/

    nextpage does not work with this permalink structure:
    /%category%/%year%/%monthnum%/%postname%/

    Forum: Fixing WordPress
    In reply to: nextpage tag
    Thread Starter phil404

    (@phil404)

    I still have not found any discussion on this bug.

    Thread Starter phil404

    (@phil404)

    Well, I implemented your code fix and all seems to be working well. Thanks again, Hugh. You saved us having to go with an ugly work-around.

    Thread Starter phil404

    (@phil404)

    Thanks, Hugh! I’m going to give your fix a try.

    Thread Starter phil404

    (@phil404)

    Thanks, Hugh. That was clarification I was seeking. Hopefully, someone is the know will provide you with the info you need to update the plugin for 3.0.

    Thread Starter phil404

    (@phil404)

    Hugh,

    Are you saying that WP 3.0 is missing a function that was present in earlier versions, resulting the failure of your plugin with certain permalink configurations?

    Thread Starter phil404

    (@phil404)

    Thanks, Ipstenu. Your feedback is much appreciated.

    What happens when you turn off and turn back on the plugin?

    No change.

    Does WP kick out any errors?

    No error. With permalinks configured as follows:

    /%category%/%year%/%monthnum%/%postname%/

    the link generated by the plugin (/category-slug/yearnum/monthnum/) appears to confuse WordPress, which redirects back to the requesting page.

    When the permalinks option is set to default, the link generated by the plugin (?m=####&cat=###) returns a page with the correct content: all posts belonging to cat x for year ####.

    What’s in your .htaccess?

    Pretty sure it’s the standard WP generated .htaccess :

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    Are you using SingleSite or MultiSite?

    It’s a single site installation.

    Do you have any other plugins that modify htaccess/permalinks installed?

    I do not.

    I would love to hear back from the plugin’s author on this matter, but it appears the only way to contact him is via the comments on his plugin page. Until then, I’m merely trying to pinpoint the change in WP that renders the plugin incompatible.

    -phil

    Thread Starter phil404

    (@phil404)

    Thanks, Ipstenu.

    It’s easy to dump this issue on the plugin, but obviously something has changed in WP between 2.9.2 and 3.0, to break the functionality. Specifically, something to do with how WordPress handles rewrites.

    Thread Starter phil404

    (@phil404)

    Glad YOUR problem has been resolved, bsuneja.

Viewing 15 replies - 1 through 15 (of 16 total)