Skip to content
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

Adding HTML comment in markup when registering sidebars #1632

Merged
merged 2 commits into from
Apr 19, 2019

Conversation

seanchayes
Copy link

#1482
I've added the id to the register_sidebar to be output as an html comment in part of the before_widget markup.

The other option would be to do the same but as a class.

@benlk
@INN/tech-team

@benlk
Copy link
Collaborator

benlk commented Feb 12, 2019

This is an interesting way of doing it; thank you! Can you provide some output code from this on pages, perhaps a diff of a homepage or category page with sidebars, diffing current 0.5-dev with this PR? If not, we'll get around to doing that diff ourselves later.

@seanchayes
Copy link
Author

I've captured these screenshots of the the markup when using this branch of code for the home page, a category/archive page and an article page.

I have added diff files too after each one.

Article page
largo-article-sidebar-naming
article-diff.txt

Category / archive page
largo-archive-sidebar-naming
archive-diff.txt

Homepage
largo-homepage-sidebar-naming

homepage-diff.txt

As an option, if desired, I could add a closing html comment in the sidebar code too. So we have <!-- Sidebar name --> in the before_widget. I could add <!-- / Sidebar name --> to the after_widget

Regardless let me know if you have any questions.

@benlk
Copy link
Collaborator

benlk commented Apr 12, 2019

This is approved for merge; @seanchayes how would you like to be credited in the changelog, release notes, and readme lists of contributors?

@seanchayes
Copy link
Author

Yes - thank you.

@benlk
Copy link
Collaborator

benlk commented Apr 12, 2019

What name should we call you by in those places?

@seanchayes
Copy link
Author

seanchayes commented Apr 13, 2019 via email

@benlk benlk added this to the 0.6.2 milestone Apr 18, 2019
@benlk benlk merged commit d8b15e8 into WPBuddy:0.5-dev Apr 19, 2019
benlk added a commit that referenced this pull request Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants