Template administration Error after WP 4.8 update

This is a generic PHP question, but simple to answer. The problem is most likely caused by PHP 7. Simply change the line: $callback[0]->$callback[1](); to $callback[0]->{$callback[1]}(); This is because $callback[0]->$callback[1](); means $callback[0]->{$callback[1]}(); in PHP5, while it means ($callback[0]->$callback)[1](); in PHP7. Take a look into this page to know the details about the change.

How can I hardcode template selection?

First, let’s take a look at your code with some comments to show what’s happening. /** * Adds the function “set_templates” to the “template_include” filter with a * prioritiy of 99 (default is 10). * * What this means is that whenever WordPress runs the filter “template_link”, * your function “set_templates” will be called and … Read more

displaying category and subject posts

I’m not sure if I get you right, but if so, this will solve your problem: <?php $classes = array(); $subjects = get_the_terms( get_the_ID(), ‘subject’ ); $categories = get_the_terms( get_the_ID(), ‘category’); if ( count($terms) > 1 ) { $classes[] = “reset”; } else { foreach ($subjects as $term ) { $classes[] = $term->slug; } } … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)