Include Template Based on User IP Address

template_include is a filter – it takes one argument and it should always return a value (a template to include). Your function doesn’t do that. It doesn’t take any arguments and it returns value only if the condition is true – so if it’s not, it returns no value, so no template will be included … Read more

problem including page template

I think you meant to use: get_template_directory() Codex: Absolute path to the directory of the current theme (without the trailing slash). (link) instead of: get_template_directory_uri() Codex: Retrieve template directory URI for the current theme. Checks for SSL. (link) if you’re using include() for PHP code. But you should rather consider using: get_page_template() Codex: Retrieve path … Read more

Template Include crashing browser

You have a couple mistakes in your code: is_archive() does not accept any parameters is_archive() does not accept any parameters. If you want to check if this is the archive of a custom post type, use is_post_type_archive( $post_type ) Instead of using include( plugin_dir_path( __FILE__ ) . ‘my-template.php’);, use dirname( __FILE__ ) . ‘my-template.php’; Single … Read more

Get template name by full URL

You can make use of the global $template which holds the complete path of the current template being use to display a page. From there you can manipulate the value to get the name of the template As example, the value of $template looks like this: (This is on my localhost on my PC) E:\xammp\htdocs\wordpress/wp-content/themes/pietergoosen2014/page-test.php … Read more

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