Skip Navigation

[Resolved] Adding id/classes to archive block does not work

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by carletto0282 3 years, 11 months ago.

Assisted by: Waqar.

Author
Posts
#1918297
Schermata 2021-01-26 alle 00.23.17.png
Schermata 2021-01-26 alle 00.22.19.png

I am trying to:
add some classes to the wrapper div of a custom post type archive block. I've tried to select "Wordpress Archive Output" from block tree but it has no options

Link to a page where the issue can be seen:
I'm sorry, it's a local environment

I expected to see:
the classes in my html code

Instead, I got:
nothing

#1918559

Hi,

Thank you for contacting us and I'd be happy to assist.

During testing, I was able to reproduce this and the custom ID or classes include in the main "WordPress Archive" block are not included in the markup on the front-end.

We appreciate you've brought this forward and I've passed this on to the concerned team.

For now, a workaround can be to either add your custom CSS styles to target the default div with class "wp-block-toolset-views-wpa-editor" or if you'd prefer adding a custom class to that div, you can include the following script in the WordPress Archive's "Custom JS":
( screenshot: hidden link )


jQuery(document).ready(function(){
	jQuery('.wp-block-toolset-views-wpa-editor').addClass('test-wrapper');	
});

Note: you'll replace "test-wrapper" with your own class name to add.

regards,
Waqar

#1918605

Hi Waqar,

thanks for your suggestion.
I'll go with the custom CSS styles and hope for a quick fix of the behaviour as expected.

I left the ticket open.
Best regards
Carlo

#1918789

Thanks for writing back.

I'm afraid, I don't have a time estimate at the moment, but, it has been reported to the development team.

You're welcome to mark this ticket as resolved and start a new one for a different question or concern.

#1918947

As already stated above I'll go with the custom CSS and look forward for a fix.
Thank you!