• Resolved nooshu

    (@nooshu)


    Hello,

    I’m currently having a problem with a custom theme i have built. When a user goes to preview a post they are writing it doesn’t show the post page, it only shows the homepage.

    I know it’s a theme issue as the default template works fine.

    Does anyone have any suggestions on what it could be? I’ve looked about for a solution but not had much luck.

    Thanks in advance,
    Matt

Viewing 1 replies (of 1 total)
  • Thread Starter nooshu

    (@nooshu)

    Ok fixed it. Very random error.

    In my functions.php i had the following code

    $p = array(
    	'before_widget'  =>   "\n\t\t\t" . '<li id="%1$s" class="widget %2$s"><div class="inner">',
    	'after_widget'   =>   "\n\t\t\t</div></li>\n",
    	'before_title'   =>   "\n\t\t\t\t". '<h3 class="widgettitle"><span>',
    	'after_title'    =>   "</span></h3>\n"
    );
    if (function_exists('register_sidebars')){
    	register_sidebars(1, $p);
    }

    Note the $p, that must have been overwriting something in WordPress as once i’d changed that to $args everything worked perfectly.

    Phew!

Viewing 1 replies (of 1 total)
  • The topic ‘Preview Post only show homepage’ is closed to new replies.