User Following System

Here are some pointers: Why are you using output buffering in tb_get_follow_unfollow_links()? I see no reason this is needed. In tb_get_follow_unfollow_links() only echo 1 button. On page load use php to decide what classes and button text you have to set. With jQuery change the button when you get a successfull ajax return. Change the … Read more

Custom Post Type single post type shown in theme single.php

OK, let’s try to find this filter in WP code… In wp-includes/template.php you can find this: function get_single_template() { $object = get_queried_object(); $templates = array(); if ( ! empty( $object->post_type ) ) { $template = get_page_template_slug( $object ); if ( $template && 0 === validate_file( $template ) ) { $templates[] = $template; } $name_decoded = … Read more

what’s different between wpdb->prefix and table_prefix

The difference is pretty simple. $wpdb->prefix is getting the prefix field from global $wpdb object. $table_prefix can be anything. Most probably it’s some local variable that contains the same value, but you can assign anything to that variable. So using $wpdb->prefix is a better idea – it’s nicer, cleaner and more obvious.

WordPress delete cookie

You can delete all cookies that belong to your domain. See the answer to this here: https://stackoverflow.com/questions/2310558/how-to-delete-all-cookies-of-my-website-in-php . You would have to build a form with a button to that (on submit) would call the function that deleted the cookies that belong to your domain. I don’t think you can delete cookies that don’t belong … Read more

WP options plugin setting not saving the selected checkboxes

Your code just outputs empty checkboxes. You have to check each box’s value and then set checked=”checked” if it’s true. <td><input type=”checkbox” placeholder=”Meta Key” name=”map_option_3″ <?php // check whether map_option_3 was saved if(isset(get_option(‘map_option_3’))) { ?>checked=”checked”<?php } ?> />Name<br> <input type=”checkbox” id=”cb_name” name=”map_option_4″ <?php // check whether map_option_4 was saved if(isset(get_option(‘map_option_4’))) { ?>checked=”checked”<?php } ?> />Price<br><input … Read more