devsaredead
Forum Replies Created
-
Before delving into the .xml option let me clarify what I mean by “not saving”. The string is available for translation but my modifications are not saved and stay as the original.
….I was searching for a manual excerpt field within the single post, but it doesn’t exist.
Here‘s post examples from the theme documentation.
Now I found the excerpt field, it wasn’t enabled by WP. Falang is able to read the default/translated language if I use the manual field π but only if I use it, whereas it doesn’t work if I leave the field empty
- This reply was modified 1 year, 3 months ago by devsaredead.
- This reply was modified 1 year, 3 months ago by devsaredead.
- This reply was modified 1 year, 3 months ago by devsaredead.
It’s strange. Before testing the Add-on, I have disabled the Excerpt option from my theme, but they still appear in the posts list. Also, there is no excerpt option within the single blog query element. I wonder why.
no I don’t use that addon….. let me give it a try
- This reply was modified 1 year, 3 months ago by devsaredead.
…basically it’s a WPbakery blog query element, created by my theme. The exceprt is also driven by the theme’s options.
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] Conflict with blog paginationside note: that solution only works if you add the Falang filter
function page_with_pagination(){ return true; } add_filter ('falang_page_use_pagination','page_with_pagination');Forum: Plugins
In reply to: [Falang multilanguage for WordPress] Conflict with blog paginationIt looks like this problem with Falang has been known for some time. I also found many solutions on this article, but none of them works. I reckon it is a WordPress problem but Falang is contributing to the conflict. I hope you can come up with a solution.
UPDATE. Among the many solutions I found one that works and doesn’t conflict with Falang: in the permalinks custom /%category%/%postname% (notice the removal of the ending forward slash “/”)
I still think it is not the best solution (also because one might not want to use a custom permalink structure), but meanwhile….
- This reply was modified 1 year, 3 months ago by devsaredead.
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?Hello again, if you feel helping me again in applying the function only to one category, I have had a reply from Woocommerce and they say that we need first to hook into the
woocommerce_product_tabsfilter and then check if the product belongs to the desired category within the function. They propose this:function woo_custom_product_tab($tabs) { global $post;
// Check if the product belongs to the "Phones" category
if (has_term('Phones', 'product_cat', $post->ID)) {
$tabs['custom_tab'] = array(
'title' => __('Custom Tab', 'woocommerce'),
'priority' => 50,
'callback' => 'woo_custom_product_tab_content'
); }
return $tabs;}add_filter('woocommerce_product_tabs', 'woo_custom_product_tab', 9999);
// Content for the custom tab
function woo_custom_product_tab_content() {
echo '<p>' . __('This is custom tab content.', 'woocommerce') . '</p>';}which I’m trying to combine with our solution for all categories:
/* New Product Tab @ WooCommerce Single Product */
if (class_exists( 'Falang' )) {
$current_locale = Falang()->get_current_language()->locale;
if ($current_locale == 'it_IT') {
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab_it', 9999 );
function woo_new_product_tab_it( $tabs ) {
$tabs['docs'] = array(
'title' => __( 'Preventivo', 'woocommerce' ), // TAB TITLE
'priority' => 50, // TAB SORTING (DESC 10, ADD INFO 20, REVIEWS 30)
'callback' => 'woo_new_product_tab_content_it', // TAB CONTENT CALLBACK
);
return $tabs;
}
function woo_new_product_tab_content_it() {
// The new tab content
global $product;
echo 'richiesta noleggio volo per ' . $product->get_name();
echo do_shortcode( '[forminator_form id="1046"]' );
}
}
if ($current_locale == 'en_US') {
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab_en', 9999 );
function woo_new_product_tab_en( $tabs ) {
$tabs['docs'] = array(
'title' => __( 'Quotation', 'woocommerce' ), // TAB TITLE
'priority' => 50, // TAB SORTING (DESC 10, ADD INFO 20, REVIEWS 30)
'callback' => 'woo_new_product_tab_content_en', // TAB CONTENT CALLBACK
);
return $tabs;
}
function woo_new_product_tab_content_en() {
// The new tab content
global $product;
echo 'rent request for ' . $product->get_name();
echo do_shortcode( '[forminator_form id="1059"]' );
}
}
}I need to put if (has_term(‘Phones’ before if (class_exists( ‘Falang’ )), but I simply don’t know how to avoid conflicts. If you help I’d appreciate a lot π
Sorry, can you help me understand how come hackers find the login page and I cannot? I have Wordfence warning me that they try to login and it blocks them, then there must be a way to login. As a matter of fact it’s AIO that is preventing to see the page, because the permalink I changed is not working.
Hello Tobias, yes I’d rather not go for the Spielo solution but rely on the official author π
You can view the new Tablepress here on this page (applied to the 2nd table), and compare it with my old CSS. I wish to retain the header + odd rows background, the pagination buttons, and the search field right alignment above the tables container.
Looking forward to your reply.
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?Sure, thank you very much indeed for trying. I will let you know if I find a solution… π
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?…unfortunately it’s still not able to detect the product category and the custom tab is visible in every product. We must try a different syntax…
Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?donβt put AND but OR, you have to display it for noleggio OR rents
yes but I have no idea how to do this, I’m no coder π sorry. Something like this, maybe?
if ( has_term( ['noleggio','rents'], 'product_cat' ) ) {
if (class_exists( 'Falang' ))Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?…yes the content is correct, but it was also in the original code π
I guess we just need to insert the 2 categories IF statements:
if ( has_term( 'noleggio', 'product_cat' ) )andif ( has_term( 'rents', 'product_cat' ) )but they must go outside
if (class_exists( 'Falang' )), right?Forum: Plugins
In reply to: [Falang multilanguage for WordPress] translation of functions ?I can spot the small difference in the code but it doesn’t work. I mean, it changes the tab content as per language, but the tab is visible for all categories. As a matter of fact, I don’t see anything that could recall a logic like “check if the product is from category X and: show custom tab if it is, hide the tab if it isn’t”.
It looks like you removed/forgot the
if ( has_term( 'noleggio|rents', 'product_cat' ) )