Forums

with a single page pulling the wrong comment form (2 posts)

  1. mkjar
    Member
    Posted 1 year ago #

    so I am using this function to have any single post with a certain category (in this instance cat id 122 so it is "single-122.php") that displays a holiday template :

    /*add this in for category specific single post templates*/
    add_filter('single_template', create_function('$t', 'foreach( (array) get_the_category() as $cat ) { if ( file_exists(TEMPLATEPATH . "/single-{$cat->term_id}.php") ) return TEMPLATEPATH . "/single-{$cat->term_id}.php"; } return $t;' ));

    the problem is that the comment form is loading a form associated with a totally different post. and since these are holiday giveaway posts I have to figure out what is happening asap to fix the problem. is there a way to reset it?

  2. mkjar
    Member
    Posted 1 year ago #

    I ended up just removing the function - but i would like to figure out what happened so I wont do it again - any insights?

Topic Closed

This topic has been closed to new replies.

About this Topic