Support » Plugin: WP Maintenance Mode » how change font of plugin

  • Resolved hosseinalehabib

    (@hosseinalehabib)


    hello, i want to change the font of plugin , what should i do?
    please explain step by step.

    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author George J

    (@georgejipa)

    Hello @hosseinalehabib,

    There is no built-in option to change the font. But if you have CSS skills, you can use the next snippet of code to add custom CSS.

    
    function wpmm_add_custom_css() {
    	?>
    	<style>
    		/* here you add the CSS for the font */
    	</style>
    	<?php
    }
    
    add_action('wpmm_head', 'wpmm_add_custom_css');
    

    Place the snippet at the end of the functions.php file (located inside your active theme/child-theme directory). If there is a PHP closing tag ?>, make sure you add the code before it.


    George

    bram4499

    (@bram4499)

    @hosseinalehabib did you succeed? And can you perhaps provide the steps. This is still black box for me and I would really like to change the font on the Maintenance page.

    All help is welcome!

    • This reply was modified 5 months ago by  bram4499.
    bram4499

    (@bram4499)

    For everyone like me that had no clue how to do this:

    In the menu go to Plugin Editor under the Plugins button. Then on the right select the WP Maintenance Mode plugin and in the menu on the right click Includes -> Functions -> Hooks.php

    I copied @georgejipa snippet of code including a closing tag ?> and added it here: wp-maintenance-mode/includes/functions/hooks.php

    See how it looks on my website

    I used a font from Google Fonts. Here’s my code:

    function wpmm_add_custom_css() {
    	?>
    	<link href="https://fonts.googleapis.com/css?family=Raleway&display=swap" rel="stylesheet">
    	<style>
    		body {
            font-family: 'Raleway', sans-serif;
            font-size: 38px;
    		line-height: 1.0;
          }
    		label {
      		font-family: 'Raleway', sans-serif;
            font-size: 18px;
    		color:	white;
    		}
    	</style>
    	<?php
    }
    
    add_action('wpmm_head', 'wpmm_add_custom_css');

    This is so not handy. The plugin should have the option to include some custom CSS. Not like this!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.