How to assign post to category

You have to register built-in “category” taxonomy for the “Activity” post type: <?php function add_categories_to_activities() { register_taxonomy_for_object_type( ‘category’, ‘activity’ ); } add_action( ‘init’, ‘add_categories_to_activities’ ); See register_taxonomy_for_object_type() in the Code Reference.

How to change the deafult template in WordPress plugin

For your plugin question, you need to contact the plugin’s support guys. Plugin questions are not within scope here. For information about templates, start here to gain knowledge on how they work: https://codex.wordpress.org/Templates. Templates are part of the theme, so to change the template, you have to change the template used by the theme. But … Read more

Adding styles/scripts to specific page

You have wp_enqueu_script within your function spelled wrong. It should be wp_enqueue_script. Also is_page_template() will look for your template file as is relative to your theme directory. If file.php is in the root of your theme then it would just be is_page_template(‘file.php’). Here is the reference for that function: https://developer.wordpress.org/reference/functions/is_page_template/ Try this: function test(){ if( … Read more

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