Problem with AJAX in wordpress plugin

After Milo’s tutorship: I recommend first reading how to use AJAX in Plugins properly. – Milo yesterday and reading another questions on wp.stack, my problem was solved) Here is an examples of code from my rewritten files 1)get_state.php: ad add_action( ‘wp_ajax_ajax_object’, ‘ajax_handler’ ); add_action( ‘wp_ajax_nopriv_ajax_object’, ‘ajax_handler’ ); function ajax_handler() { global $wpdb, $results, $info, $data, … Read more

Limit Taxonomy Output in Conditional Statement

Samuel Elh correctly answered this. if ( $type === ‘portfolio’ ) { $terms = get_the_term_list( $post->ID, ‘royal_portfolio_cats’, ”, $separator ); $term_array = explode(‘,’,$terms); if ( $limit = array_slice($term_array, 0, $max = 5) ) { echo implode( “, “, $limit ); if ( count( $term_array ) > $max ) { echo “…”; } }; }

Assign custom parameter to each post in query

It’s a neat idea! The way I would tackle the problem is to create an associative array of post IDs mapped to their individual weights. Since weights are subjective – that is, the represent the value of other posts’ relationships with the post currently being displayed – it doesn’t make much sense to store these … Read more

Remove dash from blog title wordpress

This is not quite trivial in general case, since it varies depending on title implementation by specific theme. The historical way has been wp_title() call in theme’s template. The newer method is hook–based Title Tag. So it is hard to say specifically without knowing/seeing code of a specific theme. This is one of the reasons … Read more