WP-API restfull JSON and post meta?

Custom posts ignore the normal filter – have a look at class-wp-json-pages.php to see how to do build one for custom posts. <?php /** * Page post type handlers * * @package WordPress * @subpackage JSON API */ /** * Page post type handlers * * This class serves as a small addition on top … Read more

How to handle shortcodes when using the JSON API

You can add your own AJAX API for do_shortcode. Add this to a suitable location (i.e. functions.php or a plugin): add_action(‘wp_ajax_doshortcode’, ‘ajax_doshortcode’); function doshortcode() { echo do_shortcode($_POST[‘text’]); die(); // this is required to return a proper result } And this to your Javascript: $.ajax({ url : ajaxurl, data : { action : ‘doshortcode’, text : … Read more

Create post using JSON api plugin

I’ve worked on JSON API for a iPhone app development for a WordPress site to post photos but not using JSON API Plugin, But the basic procedure would be: As you need to be logged in to publish your post, the communication is going to be two way 1. Author writes a article as draft … Read more

Add external js file to footer with id

You can use the script_loader_tag hook function enqueue_validation_script() { wp_register_script( ‘validation’, ‘https://www.asd.in/script.php?id=3ff00a469474bbe71a9218a7f0377518’, array( ‘jquery’ ) ); wp_enqueue_script( ‘validation’ ); } add_action(‘wp_enqueue_scripts’, ‘enqueue_validation_script’); function add_id_to_validation_script( $tag, $handle, $src ) { if ( ‘validation’ === $handle ) { $tag = ‘<script type=”text/javascript” id=”3ff00a469474bbe71a9218a7f0377518″ src=”‘.$src.'”></script>’; } return $tag; } add_filter( ‘script_loader_tag’, ‘add_id_to_validation_script’, 10, 3 );

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