Other customizationsΒΆ

  • Global options: store some global options (which are language-dependent, such as: email)
<?php
        function add_global_custom_options()
        {
            add_options_page('Global Custom Options', 'Global Custom Options', 'manage_options', 'functions','global_custom_options');
        }

        function global_custom_options()
        {


?>
            <div class="wrap">
                <h2>Global Custom Options</h2>
                <form method="post" action="options.php">
                    <?php wp_nonce_field('update-options') ?>
                    <p><strong>Email:</strong><br />
                        <input type="text" name="email" value="<?php echo get_option('email'); ?>">
                    </p>
                    <p><strong>Phone number:</strong><br />
                        <input type="text" name="phone" value="<?php echo get_option('phone'); ?>">
                    </p>
                    <p><strong>Address:</strong><br />
                        <textarea name="address" rows="6" cols="100"><?php echo get_option('address'); ?></textarea>
                    </p>
                    <p><strong>Bank account info:</strong><br />
                        <textarea name="bank_account" rows="6" cols="100"><?php echo get_option('bank_account'); ?></textarea>
                    </p>

                    <p><input type="submit" name="Submit" value="Store Options" /></p>
                    <input type="hidden" name="action" value="update" />
                    <input type="hidden" name="page_options" value="email,phone,address,bank_account" />
                </form>
            </div>


        <?php
        }
  • Mask params: params that change the home page backgound presentation.
<?php
        add_action('admin_menu', 'add_mask_params');
        function add_mask_params()
        {
            add_options_page('Mask param', 'Mask param', 'manage_options', 'mask_param', 'mask_param');
        }
  • Translation registering: Register translation, which will be available on backend.
<?php

        pll_register_string("Partners", "Partners");
        pll_register_string("Customizers", "Customizers");
        pll_register_string("Projects", "Projects");
        pll_register_string('Read more', 'Read more');
        pll_register_string("What's happening", "What's happening");
        pll_register_string("Testimonials", "Testimonials");
        pll_register_string("Some of our clients", "Some of our clients");
        pll_register_string("Partners", "Partners");
        pll_register_string("Let's connect", "Let's connect");
        pll_register_string("provide-us", "provide-us");
        pll_register_string("Discover our open positions", "Discover our open positions");
        pll_register_string("Connect us on Linkedin", "Connect us on Linkedin");
        pll_register_string("Navigation", "Navigation");
        pll_register_string("Contact", "Contact");
?>

For more detail, please view functions.php on themes/trueson