I believe to get this working I wasn’t calling this at the correct time, and I wrapped it in a function after_setup_theme
, like so:
add_action( 'after_setup_theme', 'ttp_custom_font_sizes' );
function ttp_custom_font_sizes() {
// removes custom font sizes
add_theme_support('disable-custom-font-sizes');
// add my own custom sizes
add_theme_support( 'editor-font-sizes', array(
array(
'name' => __( 'Small'),
'size' => 12,
'slug' => 'small'
),
array(
'name' => __( 'Normal'),
'size' => 16,
'slug' => 'normal'
),
array(
'name' => __( 'Large'),
'size' => 36,
'slug' => 'large'
),
array(
'name' => __( 'Huge'),
'size' => 50,
'slug' => 'huge'
)
) );
}
Related Posts:
- Add colors to existing color palette without replacing it
- create-guten-block in wordpress theme?
- How to update mark-up of a gallery block in a custom theme?
- Correct way to make a custom block theme responsive
- Full site editing templates folder vs block-templates
- The the_post_thumbnail without srcset?
- after_setup_theme always runs
- WordPress API Menu/Submenu Order
- What WP folder can I use to write files to?
- Why I can’t add a CSS style in this WordPress theme?
- Allow Shortcode in Theme Customizer
- Where to post/upload the new theme for WordPress theme repository
- register_sidebar ignores ‘id’ and ‘class’
- Display a different theme for not logged-in users
- Best practice (forward compatibility) for theme options
- Single Page WordPress Theme – Using page templates
- Can you filter posts by meta key with the getEntitityRecords selector?
- add_theme_support( ‘custom-header’ ) does not add option menu in dashboard
- Returning Variables back into a template
- new theme permissions don’t allow me to edit
- Which theme foundry has clean coded themes, where code is poetry [closed]
- What page should I use for a contact form?
- Retrieve data using wpdb to use for customizer controls
- How can a Theme Contain no Header File or Footer File?
- Some translations do not work in my template class
- Does any theme support child theme?
- WordPress not registering Theme Customization Section
- How to remove a file included in parent theme with locate_template() via child theme?
- “add_theme_support” for custom footer color?
- Why wp_head() function not loading style.css?
- Can’t select my block by clicking on it
- How to add infinite scroll?
- get_option in header.php not returning value from customizer
- Internal error 500 accessing Theme > Customize
- Which html elements should be styled in wordpress theme
- Theme Development: Starter Content after hook
- Change locale by detecting viewer’s browser language setting and let them choose prefered language after
- Why is it needed to enqueue parent stylesheet in child theme?
- Is there any WordPress theme for Self Storagae just like Spacer [closed]
- Customizer: save setting/control content to post/page
- WordPress Unite Theme: Footer isn’t sticking [closed]
- Is accessing theme and using customizer GPL distribution?
- How to enqueue javascript for WP Customize options sidebar?
- WordPress 500 Internal server error when activating custom theme [closed]
- Customize how a WordPress theme looks like in the Theme Selector
- How to set a page as homepage in stead of the newspages?
- Admin: sub menu doesnt display under apperance when activate my themes
- Widget Option is Missing
- WordPress Theme Validator?
- If you were to start using a WordPress framework today, which one would you use? [closed]
- Template for landing pages
- Is it possible to have a theme that uses only one single page?
- underscores use of the article element on the page template
- Plugin does not work in custom theme
- html5-reset theme does not show the image [closed]
- Adding a gallery to my first theme
- What exactly is “wordpress theming”? [closed]
- Theme Action to hook for one time only function [duplicate]
- Valid SQL query not returning results
- Change Image Sizes for Mobile Theme
- Recommended sidebar / content widths
- Converting a theme to a child theme in a network
- What is the difference between Twenty eleven & roots framework?
- iPad WordPress theme?
- custom Background not showing after upgrade?
- Is there a list of default generated Gutenberg block CSS? Unable to align video blocks
- How to change listing type permlink?
- How to Modify WP_Includes/blocks/latest_posts.php
- Adding popup support to the theme
- Calling a WP Plugin Function’s Variable in Theme Template [duplicate]
- Posts Page shows Classic Editor interface not Gutenberg
- How to make updatable custom WordPress theme?
- How can I access variables from theme in child theme? [closed]
- Local variable name in setup_postdata()
- Creating a Single Page Theme correctly
- Is it possible to echo a woocommerce prouct attribute discription?
- Child theme menu not appearing in Twenty Seventeen
- How do I remove header/page-title image in farvis theme? [closed]
- Is a multipurpose theme an alternative to modifying or creating a theme from scratch?
- How to link post image to post link?
- WordPress Twenty-Fourteen: How to Remove Home Page Header Image from Other Pages
- On wordpress, how do i require specific dimensions from user uploads only
- WordPress Theme Developments – Start from another theme
- Slider should be display in home template [closed]
- Modify comments_popup_link output
- Can you create a custom page with content in the center already defined?
- How to migrate the menu from the site on my own theme in WordPress?
- Trouble creating custom sanitization function when uploading video files
- RSS feed url showing page not found. How to solve it?
- How to convert that page to a wordpress template? [closed]
- Toolbox theme using printif statement – help needed understanding code block
- php file child theme directory not overriding parent theme php file [duplicate]
- How to Create a Multi Purpose Theme?
- Custom Single Page Portfolio Theme [closed]
- How to make a multilingual wordpress site to be translated one-to-one without much effort and without using translate?
- Is there a way to have WordPress autodetect page templates in the page-templates directory and any sub-folders?
- My wordpress site memory exhausted more than 1GB trying to debug with default
- How can I use pre declared blocks in a php file?
- Image and font support missing in editor when deploying theme remotely
- Why is my Toggle field not showing in Gutenberg?