Title: Diac's Replies | WordPress.org

---

# Diac

  [  ](https://wordpress.org/support/users/diac/)

 *   [Profile](https://wordpress.org/support/users/diac/)
 *   [Topics Started](https://wordpress.org/support/users/diac/topics/)
 *   [Replies Created](https://wordpress.org/support/users/diac/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/diac/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/diac/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/diac/engagements/)
 *   [Favorites](https://wordpress.org/support/users/diac/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Instant Articles for WP] Support for subtitles?](https://wordpress.org/support/topic/support-for-subtitles-1/)
 *  [Diac](https://wordpress.org/support/users/diac/)
 * (@diac)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/support-for-subtitles-1/#post-8981664)
 * Another solution is to use the specific hook ‘instant_articles_subtitle’:
 * This code is to set the subtitle from the excerpt:
 *     ```
       add_filter('instant_articles_subtitle', 'my_subtitle', 10, 2);
       function my_subtitle($subtitle, $instant_articles_post) {
       	$my_post = get_post($instant_articles_post->get_the_id());
       	$my_subtitle = $my_post->post_excerpt;
       	return $my_subtitle;
       }
       ```
   
 * This is to set it from the first occurrence of the h2 tag in the post content:
 *     ```
       add_filter('instant_articles_subtitle', 'my_subtitle', 10, 2);
       function my_subtitle($subtitle, $instant_articles_post) {
       	$my_post = get_post($instant_articles_post->get_the_id());
       	preg_match('#<h2[^>]*>(.*?)</h2>#i', $my_post->post_content, $match);
       	$my_subtitle = $match[1];
       	return $my_subtitle;
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Instant Articles for WP] An unknown error occurred](https://wordpress.org/support/topic/an-unknown-error-occurred-3/)
 *  [Diac](https://wordpress.org/support/users/diac/)
 * (@diac)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/an-unknown-error-occurred-3/#post-8254606)
 * Same here.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BruteProtect] bruteprotect_warning](https://wordpress.org/support/topic/bruteprotect_warning/)
 *  [Diac](https://wordpress.org/support/users/diac/)
 * (@diac)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/bruteprotect_warning/#post-4234892)
 * Thx 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BruteProtect] bruteprotect_warning](https://wordpress.org/support/topic/bruteprotect_warning/)
 *  [Diac](https://wordpress.org/support/users/diac/)
 * (@diac)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/bruteprotect_warning/#post-4234891)
 * Same error just after I installed version 0.9.9.8. Fast update required! I’m 
   under attack!

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