New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Related Posts: add new filter to change each RP's heading #3278

Merged
merged 2 commits into from Feb 10, 2016

Conversation

Projects
None yet
6 participants
@jeherve
Copy link
Member

jeherve commented Jan 15, 2016

Once the filter is added, you can define a custom heading like so:

function jeherve_custom_related_post_heading() {
    return 'h3';
}
add_filter( 'jetpack_relatedposts_filter_post_heading', 'jeherve_custom_related_post_heading' );

Suggested here:
https://wordpress.org/support/topic/headings-structure-good-for-accessibility

@jeherve

This comment has been minimized.

Copy link
Member Author

jeherve commented Jan 18, 2016

Another, potentially better, alternative could be to filter the whole markup maybe, like we do with jetpack_sharing_display_markup (#2835). I'm happy to make some changes to this PR based on other ideas.

@xyu What do you think?

@kraftbj kraftbj modified the milestones: 3.9.1, 3.9.2 Jan 21, 2016

@zinigor

This comment has been minimized.

Copy link
Member

zinigor commented Jan 25, 2016

Removed one unneeded var declaration, tested, works well!

@eliorivero

This comment has been minimized.

Copy link
Contributor

eliorivero commented Jan 25, 2016

@jeherve regarding the alternative you mention, I like this way you wrote it, passing the vars to JS, which opens the door to show/hide elements like entry date in #2164 or setup a default image for #2220

eliorivero added a commit that referenced this pull request Feb 10, 2016

Merge pull request #3278 from Automattic/add/related-posts-heading-fi…
…lter

Related Posts: add new filter to change each RP's heading

@eliorivero eliorivero merged commit 92f6170 into master Feb 10, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@eliorivero eliorivero deleted the add/related-posts-heading-filter branch Feb 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment