Customizing a plugin function using a hook

Maybe try the following: function set_robotsmeta_default( $post_object ) { if (!isset($post_object->robotsmeta) || $post_object->robotsmeta == “”) { $post_object->robotsmeta = “noindex,nofollow”; } return $post_object; } add_action( ‘the_post’, ‘set_robotsmeta_default’ ); EDIT: Since the above didn’t work, the code below may work, by editing the global $post object before the plugin add_meta_boxes is called. I just don’t know if … Read more

Trying to send AJAX data to WordPress hook

Untested but … You need to pass your “action” identifier with the data, like so: var data = { ‘action’: ‘my_action’, ‘whatever’: 1234 }; In your case, that action would be get_number_of_promos. The example is from the Codex page about AJAX, which you should read carefully: https://codex.wordpress.org/AJAX_in_Plugins

Post formating on Home page

Yes, it is quite simple, you just need to work in PHP. Consider you have 36 posts in a loop. $div_html_1 = ”; $div_html_2 = ”; $div_html_3 = ”; $div_html_4 = ”; $div_html_5 = ”; $div_html_6 = ”; if ( have_posts() ) { while ( have_posts() ) { if( category of post == division 1 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)