Virtual Page with Registration form
Make sure you flush the rewrite rules WPAdmin->Settings->Permalink->Save. Sometimes only flushing fix the 404 errors.
Make sure you flush the rewrite rules WPAdmin->Settings->Permalink->Save. Sometimes only flushing fix the 404 errors.
I was not able to find plugin for that and I think there might be a problem to find one. Problem is not easy to solve because as I just checked in WordPress database reference (http://codex.wordpress.org/images/9/9e/WP3.0-ERD.png) there is not special container for images in post content. If I understand correct your plugin needs to: hook … Read more
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
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 );
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
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
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
Create an endpoint. In the callback function for the endpoint call your plugin functions internally, so the whole WordPress environment is available and you are still on the same domain, no matter where the plugin URL is. Plus, make sure not to flush the rewrite rules on every page load, use the (de)activation hook for … Read more
wp_get_attachment_image($post->ID, ‘size-1′); The “post thumbnail” actually gets the featured image that is attached to the post. For an attachment, you want the attachment itself in a specific size, which isn’t the same as the featured image.
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