Support » Plugin: Collapse-O-Matic » Doesn’t work on Category or Archive pages
Doesn’t work on Category or Archive pages
-
When I use the Expand function on a Category or Archive page it doesn’t work. It looks like the script is not loaded on these pages. How can this be fixed?
The page I need help with: [log in to see the link]
-
does it work on all non category or archive pages?
What happens when you use the latest Release Candidate?
https://github.com/baden03/collapse-o-matic/releases/tag/1.8.3rc2Thanks for your reply. With the new version it’s also not working. But it looks like that none shortcodes are working in the description area of the archive pages. It worked before so therefore I thought it was related to your plugin.
It doesn’t work on all the Category or archive pages.
does it work elsewhere on the site — pages that are not category or archive pages?
Also: you might want to clear out the errors being thrown to the Javascript Console:
/wp-content/plugins/wp-bannerize/css/wpBannerizeStyleDefault.css?ver=6.0.1:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT jquery-migrate.min.js?ver=3.3.2:2 JQMIGRATE: Migrate is installed, version 3.3.2 jquery.ba-hashchange.min.js?ver=0.6:9 Uncaught TypeError: Cannot read properties of undefined (reading 'msie') at jquery.ba-hashchange.min.js?ver=0.6:9:687 at jquery.ba-hashchange.min.js?ver=0.6:9:1266 at jquery.ba-hashchange.min.js?ver=0.6:9:1270 wpBannerizeFrontend.min.js:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT /wp-content/wplc_data/check.js:1 Uncaught SyntaxError: Unexpected token '<'
- This reply was modified 1 year, 7 months ago by twinpictures.
Thanks. On other pages (homepage, posts, etc) it works fine. That’s why it’s a strange to me.
Will check the javascript errors but not sure how I can do this. But hope to find out 😉
On other pages (homepage, posts, etc) it works fine.
ok, then it must be something simple.
Here is how you can check the JS errors using your browser’s built in Developer Tools: https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_toolsYou might consider doing basic WordPress troubleshooting: Deactivate all other plugins, and see if it starts to work again. Then, re-activate each plugin one by one and check if it stops working. If so, there is a plugin causing errors or a conflict.
wp-bannerize and whatever wplc_data/check.js seem a bit suspect given the JS errors.
Strange, I’ve now deactivated all plugins accept yours and still it doesn’t work on the category page https://www.golfreizen.nu/golfreis/golfreizen/egypte/ for example while it is working properly on the mainpage https://www.golfreizen.nu/ and other pages and post.
The errors or gone now so I will try to find out wich one this caused but it hasn’t any effect on this problem unfortunately.
Interesting! The .js and the .css are being loaded, it seems the content is not being passed through the_content filter which is what is normally used to render shortcodes (in addition to a bunch of other stuff). Since it seems you are the author of the theme, you should be able to easily check the category.php and
archive.php page templates. Are these pages using WP standards to render the content? https://codex.wordpress.org/Category_TemplatesIndeed interesting.
I tried also other templates but didn’t work either. But maybe I’ve to try a total different one. Below the code that calls the content on the Category page. Something wrong you may see in this?
<?php if ( category_description() ) : // Show an optional category description ?> <div class="entry-content"><?php echo category_description(); ?></div> <?php else : ?> <?php endif; ?>
By the way, I found the errors and solve them or know which plugin it caused. Thanks for your help in this.
- This reply was modified 1 year, 7 months ago by Pascal.
<?php echo category_description(); ?>
I think we found the issue! try one of the following instead:
in the category and archive.php templates:
<?php echo do_shortcode( category_description() ); ?>
or in the theme’s function.php simply file add:
add_filter( 'term_description', 'do_shortcode' );
In fact, I would try the add_filter option first and it would affect all descriptions, not just categories.
- This reply was modified 1 year, 7 months ago by twinpictures.
Thanks again, YES this solves the issue.
I.ve added the code below in function.php of the theme and it’s working properly by now.
add_filter( 'term_description', 'do_shortcode' );
glad it worked out. if you like the plugin or its support, please consider leaving a review.
Yes indeed, toke a long time to find it. Was better to use earlier this support. Of course I will place a 5-star review.
- The topic ‘Doesn’t work on Category or Archive pages’ is closed to new replies.