Warning at top of website & top menu gone

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

How to pass username in affiliate link in wordpress website

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 a Tag Parameter / Filter to My Shortcode

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

How do I pass $in_foooter to wp_enqueue_script() without passing other params?

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)