unicco
Forum Replies Created
-
I agree with @wocmultimedia.
In my opinion QtranslateX is still the best plugin for running multilingual sites, even though it havn’t been updated for a while. I’ve made some small adjustments to the plugin, as the Yoast & the Qtranslate-X slug plugin wasn’t compatible anymore.
Guess someone have to fork the repo, and keep the plugin updated. There are great potential in the plugin tho ??
- This reply was modified 7 years, 8 months ago by unicco.
Forum: Plugins
In reply to: [WP Term Order] get_terms 'orderby'It dosen’t work either: (see https://imgur.com/a/WZCE6)
I’m using the following:
$terms = wp_get_object_terms( get_the_ID(), 'pa_farve', array( 'orderby' => 'order' ) ); foreach ( $terms as $term ) { $hex_color = get_woocommerce_term_meta( $term->term_id, 'pa_farve_swatches_id_color', true ); $html_swatch .= '<a class="swatch-color-category tooltips" title="' . $term->name . '" style="background:' . $hex_color . '" ></a>'; }
- This reply was modified 7 years, 9 months ago by unicco.
Forum: Plugins
In reply to: [WP Term Order] get_terms 'orderby'Hmm. Don’t think I’ve tried that one. Do you have a source for this?
Yes. Have just tried that – issue persist. And yeah, it (might) be some async error, where each ajax is running multiple instances of itself, and thereby querying the same items multiple times (as it dosen’t wait for the previous query to finish up). It just seems strange, if you havn’t heard about this issue before – which makes me think, it’s related with my setup (plugins, theme etc.).
You mean, when I’ve filtered the items by multiple parameters? I’ve just disabled this for now (on my test environment), but you can try it out yourself. https://www.ejstruplys.dk/product-category/maerker/house-doctor/
- This reply was modified 7 years, 10 months ago by unicco.
@dcooney
Correction. Actually it’s caused by this line:taxonomy_terms="' . $cat_slug . '"
Tried disable all custom filters and custom jquery. Issue persist.Hmm. It seems it caused by these two lines: ( Not 100% sure on this just yet. )
global $wp_query; $cat_slug = $wp_query->get_queried_object()->slug;
I’m using it on the following ALM-shortcode:
echo do_shortcode( '[ajax_load_more cache="false" cache_id="category_'. $cat_slug . '_' . $language . '_' . $vat . '_' . $discount . '" id="ordinary" scroll_distance="-300" css_classes="products clearfix products-3" order="DESC" orderby="date" post_type="product" posts_per_page="9" taxonomy="product_cat" taxonomy_terms="' . $cat_slug . '" taxonomy_operator="IN" transition="fade" transition_container="false"]' );
Kinda strange, I’ll try retrieving slug some other way.
- This reply was modified 7 years, 10 months ago by unicco.
Hi again. It seems the error was caused by “All 404 Redirect to Homepage”-plugin. Everything is now working as intended – it seems. Actually really nice with the customizable cache_id. I ended up with 4 variables defining my cache_id, as I’ve different prices (vary discount and vat), qtranslatex-language and currencies. So terrific I’m able to build up different cache’s for each set of rules.
Just one more question. Is it possible to build up the cache up automatically? Could be pretty awesome with some preloader-starter (as wp-rocket uses), which crawls the site, and builds up all caches.
- This reply was modified 7 years, 10 months ago by unicco.
The error from last time still exist. On my local apache (XAMPP) server things works fine. But the cache-plugin is messing everything up on the live version, where I’m running nginx and hhvm. I’ve adjusted chmod and chown, but dosen’t change anything. I’ll try to look into this.
Thanks for the quick reply. This actually did it the trick! I really wasn’t aware of, that I had to differ the cache_id for each category. As far as I remember, your docs state something differently. I might have misunderstand that.
Well the important part is, that it seems to work properly now. I’ll try to push the changed into live version, and see the result.
Forum: Plugins
In reply to: [WP Term Order] get_terms 'orderby'Did you find a solution for this?
Could be very nice with some additional WooCommerce-examples for this. I think it’s pretty hard for many, to understand how you can customize the query (sorting).
I think its dead. We were a majority, who told the developers they needed some sort of licensed version of the plugin – in order to keep up the motivation for developing/improving this plugin (this was approx a year ago).
However, Clause and the others arthurs were pretty resolute; this wouldn’t be a problem!
7 months have passed without a single update.
Nevertheless, the plugin works, but if you use Yoast there will be incompatibility-issues. I had to go through these issues myself, modifying the code several places in qtx and slug-qtx.
- This reply was modified 7 years, 11 months ago by unicco.
Glad I could help.
You might wanna put some conditional tags in your code, to separate the two redirections. Just a suggestion.
For category you can use:
if ( is_category() ) { }
For blog-page you can use:
if ( $wp_query->query['pagename'] == 'blog' ) { }
wp_redirect( get_category_link( $category_id ) );
should actually be:
wp_redirect( get_category_link( $category_id ), '301' );
I had the same problem. I solved it by redirecting (301 SEO friendly) the user/google-robot to the main-category page, and using Ajax Load More with unlimited posts argument (which is default setting as far as I remember).
add_action( 'template_redirect', 'wpse27119_template_redirect' ); function wpse27119_template_redirect() { /* Redirect user to main category if the URL contains "/page/" */ if ( strpos( $_SERVER['REQUEST_URI'], "/page/" ) !== false ) { global $wp_query; $category_id = $wp_query->get_queried_object()->term_id; wp_redirect( get_category_link( $category_id ) ); return false; } }