tommicarleman
Forum Replies Created
-
Forum: Plugins
In reply to: [Breadcrumb NavXT] Custom parent for a taxonomyThis is the code I used to fix the issue – any recommendations on what should be done different?
function fixBreadcrumbsForPrograms($trail) { global $wp_query; // This is a hacky way to fix the breadcrumb for Program pages $programsPage = 87; // Hard-coded pageid // We only want to edit the breadcrumb on program taxonomy pages if($wp_query->query_vars['taxonomy'] == 'program') { $title = get_the_title($programsPage); $url = get_the_permalink($programsPage); $trail->trail[1]->set_title($title); $trail->trail[1]->set_url($url); } } add_action('bcn_after_fill', __NAMESPACE__.'\\fixBreadcrumbsForPrograms');
Ok, I know the issue now:
In yith-wcan-frontend.js:188 you have “var id = t.attr(‘id’);” – in my case the element that it tries to update does not have any ID, just classes, so it ends up being “undefined”
And then because I’m running roots as the base template, its default way to registering sidebar widgets is without ID:
register_sidebar( [ 'name' => __( 'Primary', 'sage' ), 'id' => 'sidebar-primary', 'before_widget' => '<section class="widget %1$s %2$s">', 'after_widget' => '</section>', 'before_title' => '<h3>', 'after_title' => '</h3>' ] );
So I just changed <section class=”widget %1$s %2$s”> to <section class=”widget %1$s %2$s” id=”%1$s”> and it works again!
Thanks for the help, and sorry for the inconvinience.
The classes seem to be correct, the products list, count and pagination all update when using the filters.
It’s only the filter selection that does not change. And there does not seem to be any js errors either.Ah, issue is now solved – it was https://www.ads-software.com/plugins/autoptimize/ that was removing the inline js
Seems that it only happens on the swedish version – works with the danish and norwegian ones… For some reason instead of being a object it becomes a string…
Maybe this explains it better:
Basically when I choose a filter, and then press “filter” it breaks
ERROR: The username or password you entered is incorrect. Lost your password?
This is the string that is shown after user tries to login with wrong username & password (woocommerce) – I need to somehow translate it to danish.
It is something that is shown by new WP_Error() by wordfence, and I read here:
https://stackoverflow.com/a/21058947/669818that you could translate those with the functions.php file.
Forum: Plugins
In reply to: [Polylang] WP SEO by Yoast – Author metatag fieldsSo if there is a field called “wpseo_author_metadesc”, can I then just create a ACF field called “wpseo_author_metadesc_da” for the danish version, and it automagically works? Or is there something extra that I need to do?