• Hi,

    you’re 2 latest version doesn’t allow to show the tabs on Page and default posts or custom template post (ex: A new section Projects in the blog).

    Change these lines :

    // if default template.. assign var to page.php
    $post->page_template == 'default' ? $post->page_template = 'page.php' : '';
    $templatefile = locate_template(array($post->page_template));

    and add this code :

    if ($post->page_template) {
    $post->page_template == 'default' ? $post->page_template = 'page.php' : '';
    $templatefile = locate_template(array($post->page_template));
    }
    else if (get_post_meta($post-$ID, 'custom_post_template', true)){
    $post->is_post_template == 'default' ? $post->is_post_template = 'single.php' : '';
    $templatefile = locate_template(get_post_meta( $post->ID, 'custom_post_template', true ));
    }

    Hope it will help someone,
    Laurent

    http://wordpress.org/extend/plugins/pagely-multiedit/

Viewing 1 replies (of 1 total)
  • This would not work for me for single posts using the default single.php template.

    if ($post->page_template) {
            $post->page_template == 'default' ? $post->page_template = 'page.php' : '';
            $templatefile = locate_template(array($post->page_template));
        }
        else if (get_post_meta($post-$ID, 'custom_post_template', true)){
            $post->is_post_template == 'default' ? $post->is_post_template = 'single.php' : '';
            $templatefile = locate_template(get_post_meta( $post->ID, 'custom_post_template', true ));
        }
        else {
            $post->is_post_template == 'default' ? $post->is_post_template = 'single.php' : '';
            $templatefile = TEMPLATEPATH . "/single.php";
    
        }

    i.e. I just added another else statement without a conditional because anything that isn’t a page or a post using a custom template is a post using the default single.php template.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Page.ly MultiEdit] Make it run for Page & Custom template post’ is closed to new replies.