Appointments+: Hide Next button

I am using the following shortcodes to display the calendar just after user select the service. Also, I need the calendar to have a pagination.

[app_monthly_schedule require_service="1"]
[app_pagination month="1"]
[app_confirmation]

The only tweak I can see is that the next month button is showing on the first page "select a service" which could be confusing since they need to select service first. Is there a way to hide the button on this first page?

  • Nahid
    • Tech Support

    Hey antKat !
    Hope you are having a great day!

    Unfortunately, it is not possible to remove the pagination as you intend, out of the box, but the following small custom workaround should serve the purpose:

    add_action( 'wp_head', 'hide_app_nav' );
    function hide_app_nav() {
    	echo '
    		<script>
    			(function($) {
    				$( document ).ready(function() {
        				var calendar = $( ".appointments-list" );
    					if ( calendar.length === 0 ) {
        					$( ".appointments-pagination" ).hide();
    					}
    				});
    			})( jQuery );
    		</script>
    	';
    }

    Please try adding the above snippet of code in your primary site's theme's (more preferably, child theme's) functions.php file. Alternatively, you can also add the code in a mu-plugin. That'll require you to paste the mentioned code in a PHP file that ends with the extension .php, e.g. "anyname.php". The mentioned code should have a "<?php" definition at the start of the file. This PHP file should be placed in {your root WordPress folder}/wp-content/mu-plugins (you'll need to create the folder named "mu-plugins" if it is not there already).

    Hope this helps. Let us know if this works for you. Thanks!

    Kind regards,
    Nahid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.