Strange “lea” prefix on wp-json

I found it. There’s a bug in the TotalPress.org Custom Post Types plugin in the file: wp-content/plugins/custom-post-types/custom-post-types.php At the top of the file, you will see the mistake: lea<?php When I remove the lea, the problem goes away. I’m contacting the plugin developer to let them know. Plugin version was 3.0.12.

JSON-LD: creating an AggregateOffer from many shortcode

If you have full control over the system, it would be best to get all of the data by some other means. If you must concatenate the shortcodes, you can parse the content to get the shortcodes with get_shortcode_regex(). You can save all the matches, and their attributes, and remove them from the content. Then, … Read more

JSON API not showing full content

You can try this to show the full post content only in the JSON API: function remove_more_wpse_96740($content) { if(get_query_var(‘json’)){ global $post; $content = preg_replace(‘/<!–more(.*?)?–>/’,”,$post->post_content); } return $content; } add_filter(‘the_content’, ‘remove_more_wpse_96740’,1); by targeting the json query variable and remove the <!–more–> part of the post. If you have a custom string like <!–more But wait, there’s … Read more

WP REST API. Configuring JSON routes

In the latest version of the API (2.0 ) the wp part is the namespace of core, default routes. This means that the core routes have URLs like “wp-json/wp/posts“, while a custom route would be something like “/wp-json/woo-comm/sizes“. The documentation just hasn’t caught up yet. Which version are you using?