Hot answers tagged

1

Managed to fix this, as @vancoder mentioned that the wp_die was causing there to still be a response and said to use die() instead. This didn't work, so instead I changed the way the json was sent. By using wp_send_json() uinstead, we don't need to use die() or wp_die() at the end of the function as wp_send_json() includes wp_die() within it. which all seems ...


1

You can get the parent post parent first $parent_post = get_post_parent($post_id); You can then retrieve the permalink of the parent post with $parent_post->url or with get_permalink( $parent_post->ID )


1

Found it, I have logged out from the WordPress. I have added this code, now it is working, add_action( 'wp_ajax_nopriv_powerbi_manager_ajax', 'my_powerbi_manager_ajax' );


1

I would, on admin init hook check latest post's ID against a saved latest post's ID in options table and if not that latest one, add a class has-new to the dashboard entry (#adminmenu .menu-icon-dashboard), so you can create a dot on that element with ::after. Then when user clicks the posts page (check with get_current_screen()) save that latest ID in the ...


Only top voted, non community-wiki answers of a minimum length are eligible