I want to customize the_posts_navigation function by replacing prev and next with images

You can put svg text right in the prev_text and next_text. To make it a little more readable here I’ve broken it up and prepared the SVG markup first. I am only show you the “prev” link but the “next” would work the same way. $prev_label = “<span class=”cover–nav-label”>” . _e(‘Recette précédente’, ‘marque’) . “</span>”; … Read more

Unable to declare AOS library in functions

The function get_template_directory_uri() returns the path without trailing slash. So you need to write wp_register_script( ‘aosjs’, get_template_directory_uri() . ‘/js/aos.js’,…) Note the slash before “https://wordpress.stackexchange.com/questions/328563/js/aos.js”. What good for is this line, the script file should already be loaded: <script src=”https://wordpress.stackexchange.com/questions/328563/js/aos.js”></script>

Assign IDs to headings in ACF using functions.php

How are you printing the contents of the ACF field in your site code? Assuming that you have self-coded theme files, instead of using the_field() to print the field content, you should echo get_field() passed through the ‘the_content’ filter, eg: echo apply_filters( ‘the_content’, get_field( ‘my_field_name’ ) ); and it will apply the modifications from your … Read more

How to display different blocks for mobile and desktops

You’re using the right function to detect the current user agent, otherwise there is another php library you can solicit called : Mobile-detect which help to detect the user agent device and the OS as well : https://github.com/serbanghita/Mobile-Detect Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string … Read more

ACF Date Form in Custom Admin Field

Hope this code may be help you <?php /* * Add columns to event post list */ function add_acf_columns ( $columns ) { return array_merge ( $columns, array ( ‘event_date’ => __ ( ‘Event Date’ ), )); } add_filter ( ‘manage_events_posts_columns’, ‘add_acf_columns’ ); /* * Add columns to event event list */ function events_custom_column ( … Read more