Include bbPress topics and replies in WordPress search results?
Include bbPress topics and replies in WordPress search results?
Include bbPress topics and replies in WordPress search results?
How can I restrict comments on WordPress, so only the POST AUTHOR and the user who commented can see them?
Right code: $pulizia_esc = get_the_author_meta( ‘pulizia_esc’, $post->post_author ) . ‘ ‘ . get_post_meta( $post->ID, “function_pulizia”, true ) ; if ( ! empty( $pulizia_esc)) { $pulizia_esc=”<div class=”pulizia_esc”>”. $pulizia_esc . ‘ euro’ .'</div>’; }
There’s no need to add another class. The code you’re using already creates separate classes and ID. You could do this with just css: Inspect your site with console, but your div label should be technical_documents so your code would be: #tab-title-technical_documents a::before { content: “\f02d”; font-family: ‘Font Awesome 6′; font-weight: 900; } You didn’t … Read more
You can filter the image caption using the wp_get_attachment_caption filter: add_filter( ‘wp_get_attachment_caption’, ‘wpse422651_filter_image_caption’, 10, 2 ); /** * Filters the image caption. * * @param string $caption The image caption. * @param int $attachment_id The attachment ID. * @return string The filtered caption. */ function wpse422651_filter_image_caption( $caption, $attachment_id ) { // Only run if the … Read more
This happens because this code: if ( ! wp_next_scheduled( ‘myprefix_cron_hook’ ) ) { wp_schedule_event( time(), ‘every_one_hoursinwp’, ‘myprefix_cron_hook’,array(42)); } Is the same as this code: if ( ! wp_next_scheduled( ‘myprefix_cron_hook’, array() ) ) { wp_schedule_event( time(), ‘every_one_hoursinwp’, ‘myprefix_cron_hook’,array(42)); } And while you have lots of cron jobs with array(42), there is no next scheduled cron job … Read more
Internal/private functions (their names are prefixed with an underscore) can be subject to changes without a warning and break backward compatibility unlike the public functions in general. This makes the core developement move faster being able to change part of the code without having to take deprecation steps over multiple versions of core. Many internal … Read more
This works for me: // Remove WP Block add_action(‘admin_init’, ‘remove_wp_block_menu’, 100); function remove_wp_block_menu() { remove_submenu_page( ‘themes.php’, ‘edit.php?post_type=wp_block’ ); }
Figured it out! First I passed what Iceable suggested and also added moment script above, like so wp_register_script(‘moment’, “https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js”); wp_register_script( ‘fullcalendar’, “https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js”, array( ‘jquery’ ), null, true); and then I edited JS like so jQuery(function ($) { $(‘#calendar’).fullCalendar({ }) }); And it showed up!
In the code that you proposes the selector only works if previously added the attributes in the HTML. It is easier if you load a specific stylesheet just for certain users: Create a new CSS file with the specific styles, something like specific.css .just-for-user-b { color: #ffffff; } Add this code to your functions.php <?php … Read more