• Resolved mocha24

    (@mocha24)


    When I click on the Print button in a recipe and the preview page comes up, I have to check all the boxes I want to appear every single time. I would like to be able to set some options as default. I would like to have all boxes set to print, except the nutritional info.

    I’ve poked around the “Edit Plug-ins” area and I cannot find any easy reference in any of the files there.

    This does not seem to be a “trial and error” type of situation.

    Can anyone tell me where to tweak this or even if I am in the right area?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Boxy Studio

    (@boxystudio)

    There is a built-in filter for this called “cooked_default_print_options”. You can add some custom code (as a new plugin, ideally) that would handle the filtering as such:

    add_filter( 'cooked_default_print_options', 'custom_cooked_print_options', 10, 1 );
    function custom_cooked_print_options($defaults){
        $defaults = array(
            'print_options_title' => 'checked',
            'print_options_info' => '',
            'print_options_excerpt' => '',
            'print_options_images' => '',
            'print_options_ingredients' => 'checked',
            'print_options_directions' => 'checked',
            'print_options_nutrition' => '',
        );
        return $defaults;
    }
    • This reply was modified 6 years, 11 months ago by Boxy Studio.

    Can I hide some on these default print options with this function?

    I want to remove print_options_excerpt and print_options_nutrition from the Print Options list.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Change Default Checkboxes in Print’ is closed to new replies.