• Dcttack

    (@dcttack)


    The plugin was working perfect for me and then I needed to change some permalinks to have .html on them as it is a requirement of the client and is better for SEO. When I add the .html all the pages/posts that do not have the .html work fine however the pages/posts that now have the .html do not use the theme they were assigned they revert to the default theme.

    I found this code which I think controls the extension and I can make the assigned theme go away on all pages I just can not get it correct to use the .html

    if(strlen($ruri) >= 2) {
        $pageId = false;
        list($first, $second) = explode('?', $ruri);
        if(!empty($second)) {
            $fragments = explode('&', substr($ruri, ($p + 1)));
            foreach($fragments as $fragment) {
                $bits = explode('=', $fragment);
                if($bits[0] == 'p' || $bits[0] == 'page') {
                    $pageId = intval($bits[1]);
                    break;
                }
            }
        }
        if(false !== $pageId) {
            $pageTheme = new PageTheme($pageId);
        }
        else {
            $c = strlen($first) - 2;
            while($c > 0 && $first{$c} != '/') $c--;
            $pageTheme = new PageTheme(strtolower(str_replace('/', '', substr($first, $c))));
        }
    }
    else if($ruri == '/') {
        $pageTheme = new PageTheme('');
    }

    Does anyone have any idea how I can fix this?

    https://www.ads-software.com/plugins/page-theme/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Same bug here.

    Code owner: This is the plugin I used https://www.ads-software.com/plugins/html-on-pages/

    When i disable this, your plugin works. If enabled, the theme change does not occur.

    i use no plugin and have by default set the permalinks to “.html”

    and the plugin doesnt works. so the problem is not in the plugin that u use to change the permalink but the problem is in this plugin that doesnt works with the .html extension !

    plugin author for page theme please help !
    im in great need !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘not working with.html’ is closed to new replies.