Full-Ajax Theme: parseJSON error while building a JSON object from a WordPress custom template

Replacing all the specific the_content() functions, or the_ID… etc by the getters equivalent seems to fix the problem. Here the solution: <?php $o = array(); $o[ ‘title’ ] = wp_title( ‘|’, false, ‘right’ ); $o[ ‘type’ ] = ‘single-project’; //ob_start(); $article=”<div id=”container” class=”content-area project-content”>”; $article .= ‘<main id=”main” class=”site-main” role=”main”>’; while (have_posts()) : the_post(); $article … Read more

Hook onto Add New Category

You can try out the created_term hook: /** * Do ‘stuff’ when a term is created in the ‘country’ taxonomy * using info from the referred page * * @param integer $term_id * @param integer $tt_id * @param string $taxonomy * @return void */ function custom_created_term( $term_id, $tt_id, $taxonomy ) { $my_cpt=”packages”; // Edit this … Read more