• Resolved spyretos

    (@spyretos)


    With plugin enabled in the json api code replied, there is css and js of the plugin. I fixed this by

                //print "<link rel='stylesheet' id='cpm_style-css'  href='".CPM_PLUGIN_URL.'/styles/cpm-styles.css'."' type='text/css' media='all' />";
                //print "<script src='".CPM_PLUGIN_URL.'/js/cpm.js'."'></script>";

    and by replacing it with

    		wp_enqueue_style(
    			'cpm_style',
    			CPM_PLUGIN_URL.'/styles/cpm-styles.css'
    		);
    		
    		wp_enqueue_script(
    			'cpm_script',
    			CPM_PLUGIN_URL.'/js/cpm.js',
    			array('jquery'),
                null,
                true
    		);

    and its fixed. Please add on main source.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello,

    Thank you very much, in reality I will implement in the plugin a different alternative:

    – I will include an option in the settings page of the plugin for printing the tags directly in the pages content (as the current behavior), or include them in the footer with your code.

    Unfortunatelly, there are many themes in the market that don’t follow the WordPress guide, and don’t call the WordPress function wp_footer(); in the theme to include the enqueued resources.

    Best regards.

    Plugin Author codepeople

    (@codepeople)

    Hello,

    I’ve published a plugin’s update for controlling where to load of resources: in the page’s content or footer. The option is located in the settings page of the plugin, specifically in the “Troubleshoot” section.

    Best regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JSON API broken’ is closed to new replies.