Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
- Make sure your
Local by FlyWheelWordPress install is a custom install
Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
Local by FlyWheel WordPress install is a custom install| function bis_remove_cpt_slug($args, $post_type) { | |
| if(in_array($post_type, array('artist'))) { | |
| $args['rewrite'] = array('slug' => '/'); | |
| } | |
| return $args; | |
| } | |
| add_filter('register_post_type_args', 'bis_remove_cpt_slug', 10, 2); |
| <?php | |
| add_action('admin_init', 'gpm_add_meta_boxes', 2); | |
| function gpm_add_meta_boxes() { | |
| add_meta_box( 'gpminvoice-group', 'Custom Repeatable', 'Repeatable_meta_box_display', 'page', 'normal', 'default'); | |
| } | |
| function Repeatable_meta_box_display() { | |
| global $post; | |
| $gpminvoice_group = get_post_meta($post->ID, 'customdata_group', true); |
| <? | |
| /** | |
| * Repeatable Custom Fields in a Metabox | |
| * Author: Helen Hou-Sandi | |
| * | |
| * From a bespoke system, so currently not modular - will fix soon | |
| * Note that this particular metadata is saved as one multidimensional array (serialized) | |
| */ | |
| function hhs_get_sample_options() { |
| location /redirect/ { | |
| rewrite ^/redirect/(.*)$ /redirect/index.php?id=$1 last; | |
| } |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteRule ^index\.php$ - [L] | |
| RewriteRule (.*) ./index.php?id=$1 [L] | |
| </IfModule> |
| // Function to handle the thumbnail request | |
| function get_the_post_thumbnail_src($img) | |
| { | |
| return (preg_match('~\bsrc="([^"]++)"~', $img, $matches)) ? $matches[1] : ''; | |
| } | |
| function wpvkp_social_buttons($content) { | |
| global $post; | |
| if(is_singular() || is_home()){ | |
| // Get current page URL |
In this document I describe my setup about how to add a menu shortcut that will hibernate and reboot the system into a different OS (in my case, Windows), and then restore linux on the next reboot.
For this, I'll be using Arch Linux with systemd-boot as my boot manager, but in practice any bootloader that handles the LoaderEntryOneShot (a.k.a. BootNext) efivar should work.
NOTE It is advisable to not do this with window's fast boot feature active, since alternating the hibernation of two systems can cause shared partitions to get corrupted. However, if additional steps are taken in order to ensure the shared partition are unmounted before reboot, or no partitions are shared between the two OSs, this can be made to work with fastboot enabled which should give quite a boost in Windows' startup time.
| /** | |
| * Default Body Class Styles | |
| */ | |
| .rtl {} | |
| .home {} | |
| .blog {} | |
| .archive {} | |
| .date {} | |
| .search {} |