Add transparency to wordpress color picker?
Don’t use the built-in color picker. It is hard to use already and it will be replaced in 3.5 anyway. You will need a custom one to get transparency.
Don’t use the built-in color picker. It is hard to use already and it will be replaced in 3.5 anyway. You will need a custom one to get transparency.
What you are looking for is the selected() function. Your updated option should look like this: <option value=”<?php echo $category->cat_ID; ?>” <?php selected($option, $category->cat_ID); ?>> <?php echo $category->cat_name; ?> </option> // EDIT Oh, and BTW, in your particular case you might want to use the wp_dropdown_categories function, I guess. That would be: wp_dropdown_categories( array( ‘selected’ … Read more
There are tons of questions about using Ajax, so your question could be easily marked as duplicated but I see so BIG mistakes that I can’t say to you that the question is duplicated without explaining your mistakes. The Ajax in WordPress is handled in admin-ajax.php file, wehre you correctly sent the ajax request (see … Read more
Change Theme from Plugin based on query_vars
Migrating October CMS to WordPress
Any extra code on your server is a theoretical security risk. Instead of checking each plugin and theme if they are security risk even if they are not active, it is much easier to just delete them. This of course should not prevent you from backuping them first in case you will decide that you … Read more
Something went wrong with your installation. As commented by @Sumit get_header() is a core function and cannot be undefined. To troubleshoot: Reinstall WordPress and enable WP_DEBUG in wp_config.php: define( ‘WP_DEBUG’, true ); If it is on a live site you might want to use this instead: define( ‘WP_DEBUG_LOG’, true ); define( ‘WP_DEBUG_DISPLAY’, false ); This … Read more
Here is the answer: function bg_disable_front_page_wpseo_next_rel_link( $link ) { if ( is_front_page() ) { return false; } return $link; } add_filter( ‘wpseo_next_rel_link’, ‘bg_disable_front_page_wpseo_next_rel_link’ ); You have to return the $link, if you return nothing it will disable it for every single page…
At first, you should active the WordPress Debug mode to get the error after implement your code. The code should work, also tested on my environment. I use it on a client installation and works really well. See my source below. It is important that you use the right string for the theme slug, like … Read more
You can write your own endpoint and use wp_get_themes to get a list of themes via that. Here is a simple one: add_action( ‘rest_api_init’, function () { //Path to rest endpoint register_rest_route( ‘theme_API/v1’, ‘/get_theme_list/’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘theme_list_function’ ) ); }); // Our function to get the themes function theme_list_function(){ // Get … Read more