Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author zookatron

    (@zookatron)

    You can find information on the new Book Sections system here: https://github.com/authormedia/mybooktable/wiki/Template-System-Overview#book-sections-system

    You can override the section titles using the ‘mbt_get_<display_mode>_content_sections’ filter. So for example if you wanted to change the title of the “Endorsements” section on the storefront Display Mode, you could do so with something like this:

    function mytheme_add_content_section($sections) {
         $sections['endorsements']['name'] = 'What people are saying';
         return $sections;
    }
    add_action('mbt_get_storefront_content_sections', 'mytheme_add_content_section');

    You could also change it using the “mbt_book_section_title” filter, like so:

    function mytheme_book_section_title($title, $post_id, $section_id) {
         if($section_id == 'endorsements') {
             return 'What people are saying';
         }
         return $title;
    }
    add_action('mbt_book_section_title', 'mytheme_book_section_title', 10, 3);
    • This reply was modified 8 years ago by zookatron.
    • This reply was modified 8 years ago by zookatron.
    Thread Starter michent1

    (@michent1)

    Awesome, thanks for the clarification. the mbt_book_section_title filter was exactly what i was looking for.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filter to change section titles (Endorsements)’ is closed to new replies.