Filika Creative https://ndr.ist/en/ana-sayfa-english/ Web Tasarım, Sosyal Medya, Yazılım, Grafik, Video Tasarım Sun, 17 Apr 2022 09:17:38 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://ndr.ist/wp-content/uploads/2018/04/cropped-logo-32x32.png Filika Creative https://ndr.ist/en/ana-sayfa-english/ 32 32 Hide/show items based on expression in URL (can be index or variable) – with Javascript https://ndr.ist/en/hide-show-items-based-on-expression-in-url-can-be-index-or-variable-with-javascript/ https://ndr.ist/en/hide-show-items-based-on-expression-in-url-can-be-index-or-variable-with-javascript/#respond Sun, 17 Apr 2022 08:34:30 +0000 https://ndr.ist/?p=688 In this article I will describe how to hide and show html content with any ID based on an expression in the site URL. This code is built in javascript...

The post Hide/show items based on expression in URL (can be index or variable) – with Javascript appeared first on Filika Creative.

]]>
In this article I will describe how to hide and show html content with any ID based on an expression in the site URL.
This code is built in javascript so we expect it to work on almost all systems. Descriptions of this code are given below.

You can hide an item with the following code.

<script>
//In the URL containing HOME.COM/CATEGORY1/SUBCATEGORY1, the item with the ID HIDE-CONTENT will be hidden.
if (window.location.href.indexOf("/CATEGORY1/SUBCATEGORY1") != -1)
{ document.getElementById('HIDE-CONTENT').style.display = 'none'; };
>
</script>

You can show any element on pages with specified URL layout with below code. It will be hidden everywhere else. Before doing this, make sure you add the style style=”display:none” to the element. Thus, content that is already hidden will only be visible on certain pages.
<script>
//In the URL containing HOME.COM/CATEGORY/SUBCATEGORY the item with the id SHOW-CONTENT will be displayed.
//Assuming you saved this item as hidden before.
if (window.location.href.indexOf("HOME.COM/CATEGORY/SUBCATEGORY") != -1)
{ document.getElementById('SHOW-CONTENT').style.display = 'inline-block'; };
</script>

 

 

The post Hide/show items based on expression in URL (can be index or variable) – with Javascript appeared first on Filika Creative.

]]>
https://ndr.ist/en/hide-show-items-based-on-expression-in-url-can-be-index-or-variable-with-javascript/feed/ 0
Solved Error: commonL10n is not defined https://ndr.ist/en/solved-error-commonl10n-is-not-defined/ https://ndr.ist/en/solved-error-commonl10n-is-not-defined/#respond Sun, 17 Apr 2022 08:14:03 +0000 https://ndr.ist/?p=673 For the solution of this error, you can do a lot of searches on google, for example, you can try to do this type of search, but many sources will...

The post Solved Error: commonL10n is not defined appeared first on Filika Creative.

]]>
For the solution of this error, you can do a lot of searches on google, for example, you can try to do this type of search, but many sources will mention a code that should be added to the functions.php file, or the cause of the error will be explained, but it is entirely up to you to find the plugin that causes this error. The best thing to do is to disable individual plugins. (Be very careful if you have a security plugin or a plugin that manages your url redirects, then you may have difficulty activating plugins)

This error was caused by the plugin named “Meta Generator and Version Info Remover” on my system. I think this plugin missed an important update of WordPress and thus caused errors in many systems.

 

The post Solved Error: commonL10n is not defined appeared first on Filika Creative.

]]>
https://ndr.ist/en/solved-error-commonl10n-is-not-defined/feed/ 0
Some of the product categories are not visible when creating Woocommerce menu https://ndr.ist/en/some-of-the-product-categories-are-not-visible-when-creating-woocommerce-menu/ https://ndr.ist/en/some-of-the-product-categories-are-not-visible-when-creating-woocommerce-menu/#respond Mon, 08 Nov 2021 12:18:50 +0000 https://ndr.ist/?p=654 As it says in the title, if all of the product categories you created with woocommere do not appear on the menu creation page, it will be sufficient to add...

The post Some of the product categories are not visible when creating Woocommerce menu appeared first on Filika Creative.

]]>
As it says in the title, if all of the product categories you created with woocommere do not appear on the menu creation page, it will be sufficient to add the following code to the child theme of your active theme, that is, add it to the end of the “themes/[your theme name]-child>functions.php” file.

//for invisible product categories (https://ndr.ist)
add_filter( 'get_terms_args', 'checklist_args', 10, 2 );
function checklist_args( $args, $taxonomies )
{
$menu_taxonomies = array('product_cat', 'page', 'category','post');
if(in_array($taxonomies[0], $menu_taxonomies))
{
$args['number'] = 1000;
}
return $args;
}

The post Some of the product categories are not visible when creating Woocommerce menu appeared first on Filika Creative.

]]>
https://ndr.ist/en/some-of-the-product-categories-are-not-visible-when-creating-woocommerce-menu/feed/ 0