How to delete a theme using AJAX

You can do this by creating a post form with a nonce field… $url = admin_url(‘admin-ajax.php’); echo ‘<form action=”‘.$url.'” method=’post’>’; echo ‘<input type=”hidden” name=”action” value=”delete_theme”>’; wp_nonce_field(‘updates’); // to pass check_admin_referer echo ‘<input type=”hidden” name=”slug” value=”twentythirteen”>’; echo ‘<input type=”submit” value=”Delete TwentyThirteen Theme”>’; echo ‘</form>’; You can replace the hard-coded slug input field with a <select> one … Read more

Hosting multiple sites

If these sites are going to be distinctly different entities, then you are going to want to set up individual sites with individual databases. Especially if these are for different clients. The domain names will be handled by the hosting company and there should be something in cPanel that will facilitate that.

How to add/change (woocommerce) product tab icon

It seems that these icons are just added with a CSS ::before selector. So if you have something like that to set up your custom tab: function woocommerce_product_write_panel_tabs(){ ?> <li class=”custom_tab”> <a href=”#custom_tab_data_mytab”> <?php _e(‘My Custom Tab’, ‘textdomain’); ?> </a> </li> <?php } Than you should be able to style the a::before with something like … Read more

Code not working with post name Permalink Settings Help

I’m not sure why you’re getting a 404, because when I run your code with permalinks = “Post name” it runs fine. However, I would suggest you use remove_query_arg() instead of all the machinations you’re doing to produce the URL to redirect to. That is, you can simplify your code down to: function affiliate_redirect () … Read more

Create a simple Testimonial page

I would suggest a custom post type for your Testimonials. Each will be created as an individual post and you will have the ability to query, sort, categorize, your testimonials just as you can with blog posts, or any other post type. Non-technical site admins can simply “add new testimonial” and edit existing, etc, just … Read more

WordPress function to add text warning on every pages [closed]

Where do you want it to appear? this function will put something before, or after, the content of each page. function rt_before_after($content) { $beforecontent=”This goes before the content.”; $aftercontent=”And this will come after.”; $fullcontent = $beforecontent . $content . $aftercontent; return $fullcontent; } add_filter(‘the_content’, ‘rt_before_after’); If you want it somewhere in particular let me know … Read more

I can’t get blog posts into ‘featured areas’ on homepage

I note you are using the Minamaze theme, correct? The problem here is the featured area, is exactly that, an area to manually enter featured content. You cannot automatically add posts to these areas. To configure them, you need to go into the admin, choose appearance, then customize. In here, choose Theme Options, then Homepage … Read more