Unable to display multiple parameters from url by javascript through shortcodes
Unable to display multiple parameters from url by javascript through shortcodes
Unable to display multiple parameters from url by javascript through shortcodes
Accidently changed the GUID
Different url to same page (with dynamic content)
yes, you should be able to call the query var by: get_query_var(‘user’); if this does not work, then “user” is not the registered query var. You can debug by dumping $wp_query and pin pointing the var / key. global $wp_query;
This function, call_user_func_array() is called by add_filter() (or add_action()) that was not declared properly. Scan the code for something like: add_filter(‘something’, ‘smartwp_remove_wp_block_library_css’) to find the culprit. If you do find it and it wasn’t something you added/changed, you will have to troubleshoot to determine why this function was not declared/found. The top menu is still … Read more
This code adds the subid parameter if does not exist to the current URL. Use this plugin to insert the php code: https://wordpress.org/plugins/my-custom-functions/ But you need to use add_action() to call this function somewhere. function my_change_url() { global $wp; $current_url = home_url(add_query_arg(array($_GET), $wp->request)); if ( empty($_GET[‘subid’]) ) { $cuser = wp_get_current_user(); $username = $cuser->user_login; $current_url … Read more
Adding query parameter to archive page returns 404
When should you use WP_Query vs query_posts() vs get_posts()?
That plugin you have is not using the WordPress Shortcode API as it should be. There is not a single add_shortcode to be found. It has basically cooked up its own shortcode ‘feature’ by hooking a preg_replace_calback into the_content define(“categoryThumbnailList_REGEXP”, “/\[categorythumbnaillist ([[:print:]]+)\]/”); define(“categoryThumbnailList_TARGET”, “###CATTHMBLST###”); function categoryThumbnailList_callback($listCatId) { And: function categoryThumbnailList($content) { return (preg_replace_callback(categoryThumbnailList_REGEXP, ‘categoryThumbnailList_callback’, $content)); … Read more
Try passing array() for $deps, and NULL for $ver: wp_enqueue_script( $handle, $src, array(), NULL, $in_footer); Or, using your function call: wp_enqueue_script(“myscript” , get_template_directory_uri().”/js/myscript.js”, array(), NULL, true ); By the way, passing the script itself as a dependency to itself will probably make something blow up. Note also: if your script depends on jQuery, just pass … Read more