Printing the value of 2 functions one near the other

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>’; }

Add class to functions.php custom code to call font awesome icon

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

Add custom text before all image captions in WordPress posts

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

Cron Register everytime if i reload admin if i pass some extra argument in wp_schedule_event function

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

WordPress internal functions : why not use them?

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

Help with adding fullcalendar.io to a WordPress page

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!

Add custom css to specific user

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

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