• Resolved tasinone

    (@tasinone)


    Hello RankMath Team,

    I’d like to suggest a couple of enhancements for the Table of Contents (TOC) feature.

    1. Customizable TOC Text: Currently, if I use a heading like “Frequently Asked Questions,” I can’t display a shorter version like “FAQ” in the TOC. Even if I manually edit the text in HTML mode, the block stops functioning correctly. It would be great if you could allow us to set custom text specifically for the TOC, independent of the actual heading.
    2. Default Heading Level for the FAQ Block: By default, the FAQ block uses an H3 heading. It would be really helpful to have an option in the settings to set a different default heading, such as H5. This could work similarly to how we can already adjust TOC settings within the RankMath options.

    I hope you’ll consider adding these features, as they would greatly enhance the flexibility and user experience.

    Best regards,
    Tasin

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @tasinone,

    Thank you for contacting Rank Math support.

    1. TOC Block allows you to edit the heading text. Here is a quick screencast for your reference:?https://i.rankmath.com/v/ZvO5BA
    2. You can use the following filter to change the default heading type of FAQ Block:
      ?
    add_filter( 'register_block_type_args', function( $args, $name ) {	if ( 'rank-math/faq-block' !== $name ) {		return $args;	}	$args['attributes']['titleWrapper']['default'] = 'h5';	return $args;}, 10, 2 );

    Here is how to add a filter to your site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    The filter will change the heading type in the frontend. The default heading type will still be set as H3 in the post editor.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

Viewing 1 replies (of 1 total)
  • The topic ‘Customizable Text and Default Heading for Table of Contents in RankMath’ is closed to new replies.