Support » Plugin: Jetpack by WordPress.com » “Follow comments” feature on pages (not only posts)

  • Resolved Annonnimmo

    (@annonnimmo)


    Hi,
    please why is this feature not available for WordPress pages, since pages are a standard part of WordPress?

    I dont’need this on strange custom post types, I need it only on simple standard WordPress pages.

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think that since WordPress permits comments on pages (as on posts), it has sense to permit also the “follow comments” feature on pages.

    It doesn’t work on pages because of the function “comment_subscribe_init” in /wp-content/plugins/jetpack/modules/subscriptions.php

    This function is restricting the e-mail follow-up on comments to posts only (so pages are prohibited from using this mechanism), with this piece of code: 'post' == get_post_type()


    Enabling “follow comments” on pages
    is a simple as modifying the code as this:

    (Original)
    if ( FALSE === has_filter( 'comment_form', 'show_subscription_checkbox' ) && 1 == get_option( 'stc_enabled', 1 ) && empty( $post->post_password ) && 'post' == get_post_type() ) {

    with

    (Modified)

    $post_type = get_post_type();
    if ( FALSE === has_filter( 'comment_form', 'show_subscription_checkbox' ) && 1 == get_option( 'stc_enabled', 1 ) && empty( $post->post_password ) && ( 'post' == $post_type || 'page' == $post_type ) ) {

    Thanks to erikpkn, I slightly modified your code to work only on posts or pages: https://github.com/Automattic/jetpack/issues/11496

    The problem is that now I cannot update Jetpack or I must modify the code each time after an update.

    May Jetpack have added this feature in the next versions?
    Thank you

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    That’s indeed not an option as Subscriptions are only meant to work for posts right now. No other post types are officially supported, not even Pages.

    You can keep an eye on our blog; we’ll post there as soon as we make iterations to the Subscriptions feature in Jetpack.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘“Follow comments” feature on pages (not only posts)’ is closed to new replies.