How can I able to exclude ‘Category’ and ‘Tag’ slug from the URL in WordPress without reloading to new site?
How can I able to exclude ‘Category’ and ‘Tag’ slug from the URL in WordPress without reloading to new site?
How can I able to exclude ‘Category’ and ‘Tag’ slug from the URL in WordPress without reloading to new site?
Would it be possible to disable embeds for specific user roles? If so, how?
The form appeared un-styled because the login_enqueue_scripts hook does not run on the front-end/non-admin side ( unless you do do_action( ‘login_enqueue_scripts’ ) in your template ). So try using wp_head instead: add_action(‘wp_head’, ‘custom_login_form’);. You should also add the custom CSS only on the app page, or when the template being used is app.php. For example, … Read more
Sounds like you’ve got a fun challenge on your hands. When you’re checking $_POST directly in functions.php, it might be too early in the WordPress lifecycle for the data to be available, or the action may be bypassing the logic you’re expecting. Instead of using an empty action attribute in your form, it’s typically best … Read more
What is the right and clean way to load these files in WordPress? The same way as you’ve always done it, wp_enqueue_script. WordPress is unaware that webpack created the javascript file, and it is just that, a javascript file. This is true wether it contains jquery, was written by hand, or was created by a … Read more
It looks like the time() was not set correctly in the first iteration of the function wp_schedule_event; First, remove this task from the queue by adding a function wp_clear_scheduled_hook and reload the page. For your example: wp_clear_scheduled_hook( ‘opportunities_cron_job’ ); Remove the cleaning function. Restart your code. If your date is not set correctly again, use … Read more
Looking at https://buddypress.trac.wordpress.org/browser/trunk/src/bp-activity/bp-activity-functions.php there’s several functions: Activity Meta I found bp_activity_add_meta, bp_activity_delete_meta and bp_activity_update_meta in that file, e.g. bp_activity_update_meta: // Update activity meta counts. if ( bp_activity_update_meta( $activity_id, ‘favorite_count’, $fav_count ) ) { Activities It looks like these can be updated the same way wp_insert_post can be used to update a post, by calling bp_activity_add … Read more
If you want to prevent HELLO from loading it’s own styles, this is the code to paste and adjust in your child theme’s functions.php : function hello_elementor_scripts_styles() { // Dequeue parent theme stylesheets wp_dequeue_style( ‘hello-elementor’ ); wp_deregister_style( ‘hello-elementor’ ); wp_dequeue_style( ‘hello-elementor-theme-style’ ); wp_deregister_style( ‘hello-elementor-theme-style’ ); wp_dequeue_style( ‘hello-elementor-header-footer’ ); wp_deregister_style( ‘hello-elementor-header-footer’ ); // Enqueue only child … Read more
Because it’s a pluggable function, and surrounded by an if statement, you can define your own function by making the logic of the if statement evaluate to falsy. In this case, to change the if statement logic to falsy, you need only to define your own wp_parse_auth_cookie() function before the pluggable.php file is loaded. I … Read more
You can modify the above code to check for the pages you want to be accessible, else redirect to login: if (!is_user_logged_in() && $GLOBALS[‘pagenow’] !== ‘wp-login.php’ && !is_page(array(‘page1’, ‘page2’, ‘page3’)) ) You can check the documentation for is_page here: https://developer.wordpress.org/reference/functions/is_page