Here’s an example filter that sets the home page as the sharing URL for posts 1234 and 5678.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
add_filter( 'wpsso_sharing_url', 'wpsso_sharing_url_by_post_id', 10, 4 ); function wpsso_sharing_url_by_post_id( $url, $mod, $add_page, $src_id ) { if ( $mod['is_post'] ) { switch ( $mod['id'] ) { case 1234: case 5678: $url = apply_filters( 'wpsso_home_url', home_url( '/' ) ); } } return $url; } |