• I tried using the services shortcode [ap-services] and encountered the following problems:

    1) it is wrongly referenced in the plugin information as [ap-service] (the “s” is missing at the end)

    2) an error on line 14 of the file: ./wp-content/plugins/accesspress-custom-post-type/inc/frontend/shortcodes.php
    The argument passed to the foreach() loop is invalid.
    I solved this by enclosing the foreach loop in an if statement to test if the $service_atts variable is a valid array.
    Like this:

    if (is_array($service_atts)) {
    	foreach( $service_atts as $key=>$value ){
    	...
    	}
    }

    The same can be done for the other shortcodes for custom post types…
    Please update de plugin.

    • This topic was modified 7 years, 7 months ago by kahana82.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Error in shortcodes.php’ is closed to new replies.