public custom posts not showing in my wordpress plugin

You are not seeing or that your function (test_get_post_types) is not returning the custom post types because if you look at the Carbon Fields source code, carbon_fields_register_fields is run by Carbon_Fields\Loader\trigger_fields_register() which is hooked on init with the priority 0. (See lines 113 and 44 in carbon-fields/core/Loader/Loader.php) So that means, by the time your lnpa_attach_theme_options … Read more

upload image with rest API to the media library

Does functions.php continuously execute while WordPress is running? Yes, it’s run on each page load. You can learn more about the (theme) functions file at https://developer.wordpress.org/themes/basics/theme-functions/. Should this be in functions.php file and how do i get it to execute only once? It can be put in that file, however, it should be run conditionally, … Read more

Customizing login message

You can use a variation of this code to change invalid login messages (adjust the message to your needs; but see note below): add_filter(‘login_errors’, function ($error) { global $errors; $err_codes = $errors->get_error_codes(); // Invalid username. if (in_array(‘invalid_username’, $err_codes)) { $error=”<strong>ERROR</strong>: Sorry, that is incorrect.”; } // Incorrect password. if (in_array(‘incorrect_password’, $err_codes)) { $error=”<strong>ERROR</strong>: Sorry, that … Read more