| Server IP : 89.108.64.180 / Your IP : 216.73.216.229 Web Server : Apache/2.4.41 (Ubuntu) System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : www-root ( 1010) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/omapart.ru/wp-content/themes/hoteller/modules/ |
Upload File : |
<?php
// Change page title for Shop Archive page
add_filter( 'wp_title', 'hoteller_title_for_shop' );
function hoteller_title_for_shop( $title )
{
if ( is_shop() ) {
return esc_html__('Shop', 'hoteller' );
}
return $title;
}
//Change number of products per page
add_filter( 'loop_shop_per_page', 'hoteller_shop_per_page', 20 );
function hoteller_shop_per_page()
{
$tg_shop_items = get_theme_mod('tg_shop_items', 16);
return $tg_shop_items;
}
// Change number or products per row to 3
add_filter('loop_shop_columns', 'hoteller_loop_columns');
if (!function_exists('hoteller_loop_columns')) {
function hoteller_loop_columns() {
return 3; // 3 products per row
}
}
/**
* WooCommerce Extra Feature
* --------------------------
*
* Change number of related products on product page
* Set your own value for 'posts_per_page'
*
*/
add_filter( 'woocommerce_output_related_products_args', 'hoteller_related_products_args' );
function hoteller_related_products_args( $args )
{
//Check if display related products
$tg_shop_related_products = get_theme_mod('tg_shop_related_products', true);
if(!empty($tg_shop_related_products))
{
$args['posts_per_page'] = 3; // 4 related products
$args['columns'] = 3; // arranged in 2 columns
}
else
{
$args['posts_per_page'] = 0;
}
return $args;
}
?>