Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
NickDeBaerdemaeker
tagDiv Member

That’s a bummer… Any chance it can be included in the next update ?
Would be really helpful.

I tried using this method but it breaks all post templates

/*
* Define a constant path to our single template folder
*/
define(SINGLE_PATH, TEMPLATEPATH . '/single');

/**
* Filter the single_template with our custom function
*/
add_filter('single_template', 'my_single_template');

/**
* Single template function which will choose our template
*/
function my_single_template($single) {
global $wp_query, $post;

/**
* Checks for single template by category
* Check by category slug and ID
*/
foreach((array)get_the_category() as $cat) :

if(file_exists(SINGLE_PATH . '/single-cat-' . $cat->slug . '.php'))
return SINGLE_PATH . '/single-cat-' . $cat->slug . '.php';

elseif(file_exists(SINGLE_PATH . '/single-cat-' . $cat->term_id . '.php'))
return SINGLE_PATH . '/single-cat-' . $cat->term_id . '.php';

endforeach;
}

NickDeBaerdemaeker
tagDiv Member

Hi, a fantastic bit of code, but sadly all my authors are right next to each other without a space or preferrably a comma, even with the additional css. any thoughts ? thanks 🙂

Viewing 2 posts - 51 through 52 (of 52 total)