How do I replace title with my plugin?

Please try this code hope it will solve your problem. add_filter( ‘wp_title’, ‘theme_custom_title’, 20 ); function theme_custom_title $title ) { return str_replace(‘your old title’, ‘your New title’, $title); } // changes the “Enter title here” to “Enter some New title” add_filter(‘gettext’, ‘custom_rewrites’, 10, 4); function custom_rewrites($translation, $text, $domain) { global $post; $translations = &get_translations_for_domain($domain); $translation_array … Read more

loop and in admin header problem

Move the query part to a separate function that returns the data you need: function rs_get_scripts_data(){ $array = array(); // query + add stuff to array return $array; } and use it with wp_localize_script like: $array = rs_get_scripts_data(); $myscript_vars = array( ‘array’ => $array ); wp_localize_script( ‘myscript’, ‘myscript’, $myscript_vars );

WordPress multiple user roles accessing on their information on one site?

You’ll need to combine some plugins and a couple of hooks. Apart from the role management, I’d recommend Adminimize: it’s quite powerful to clean up the dashboard based on user roles. And then: /** * When a registered user tries to visit a page for which he doesn’t have access, * i.e.: http:/example.com/wp-admin/plugins.php, * WordPress … Read more

Add query string variables to all hyperlinks URL matching a specified domain

Sorry I read your question wrong. You probably want to use WP_Rewrite and do something like: add_filter( ‘rewrite_rules_array’,’my_insert_rewrite_rules’ ); add_filter( ‘query_vars’,’my_insert_query_vars’ ); add_action( ‘wp_loaded’,’my_flush_rules’ ); // flush_rules() if our rules are not yet included function my_flush_rules(){ $rules = get_option( ‘rewrite_rules’ ); if ( ! isset( $rules[‘(argument_1=test&argument_2=test2)$’] ) ) { global $wp_rewrite; $wp_rewrite->flush_rules(); } } // … Read more

How can i call from custom fields to the category editor?

You are saving your extra fields to the *_options table so you need to pull them back out of that table. You can copy and cobble together bits of the existing code to do that. if ( is_category() ) { $current_cat = get_query_var(‘cat’); } $tag_extra_fields = get_option(MY_CATEGORY_FIELDS); // var_dump($tag_extra_fields); // debug if (isset($tag_extra_fields[$current_cat])) { var_dump($tag_extra_fields[$current_cat]); … Read more

Initialize class inside plugin

You don’t appear to have actually enqueued your script anywhere. You registered it, but don’t enqueue it, unless that code is elsewhere. When you load a file directly like you are– aka., browsing straight to ‘/wordpress/wp-content/plugins/konfigurator/html/class.konfigurator.php’— you can’t use any of WordPress’ functions because you have bypassed WordPress’ boot process. To use WordPress functions you … Read more

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