<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
global $product, $woocommerce_loop;
// Ensure visibility
if ( empty( $product ) || ! $product->is_visible() ) {
return;
}
// Store column count for displaying the grid
if ( empty( $woocommerce_loop['columns'] ) ) {
$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 3 );
}
// Extra post classes
$classes = array();
if ($woocommerce_loop['columns'] == 2) {
$classes[] = 'col-md-6';
}elseif($woocommerce_loop['columns'] == 4){
$classes[] = 'col-md-3';
}elseif($woocommerce_loop['columns'] == 6){
$classes[] = 'col-md-2';
}else{
$classes[] = 'col-md-4';
}
?>
<div <?php post_class( $classes ); ?>>
<div class="product-item">
<?php
/**
* woocommerce_before_shop_loop_item hook.
*
* @hooked woocommerce_template_loop_product_link_open - 10
*/
do_action( 'woocommerce_before_shop_loop_item' );
?>
<b><a href="<?php the_permalink(); ?>" class="products-warp"></b>
<?php
/**
* woocommerce_before_shop_loop_item_title hook.
*
* @hooked woocommerce_template_loop_product_thumbnail - 10
* @hooked woocommerce_show_product_loop_sale_flash - 10
*/
do_action( 'woocommerce_before_shop_loop_item_title' );
?>
<b></a></b>
<div class="product-info">
<b><a href="<?php the_permalink(); ?>"></b>
<?php
/**
* woocommerce_shop_loop_item_title hook.
*
* @hooked woocommerce_template_loop_product_title - 10
*/
do_action( 'woocommerce_shop_loop_item_title' );
?>
<b></a></b>
<?php
/**
* woocommerce_after_shop_loop_item_title hook.
*
* @hooked woocommerce_template_loop_rating - 5
* @hooked woocommerce_template_loop_price - 10
*/
<b>do_action( 'woocommerce_after_shop_loop_item_title' );</b>
/**
* woocommerce_after_shop_loop_item hook.
*
* @hooked woocommerce_template_loop_product_link_close - 5
* @hooked woocommerce_template_loop_add_to_cart - 10
*/
<b>do_action( 'woocommerce_after_shop_loop_item' );</b>
?>
</div>
</div>
</div>
<a href="http://www.ararredamenti.it/" rel="noopener" target="_blank">www.ararredamenti.it</a>
(Excel в помощь). Соответственно теперь нужно добавить хук, который выводил бы нам short description./**
* Ссылки на фабрики в /shop.
*/
add_action( 'woocommerce_brands_link', 'woocommerce_template_single_excerpt', 10 );
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
global $product, $woocommerce_loop;
// Ensure visibility
if ( empty( $product ) || ! $product->is_visible() ) {
return;
}
// Store column count for displaying the grid
if ( empty( $woocommerce_loop['columns'] ) ) {
$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 3 );
}
// Extra post classes
$classes = array();
if ($woocommerce_loop['columns'] == 2) {
$classes[] = 'col-md-6';
}elseif($woocommerce_loop['columns'] == 4){
$classes[] = 'col-md-3';
}elseif($woocommerce_loop['columns'] == 6){
$classes[] = 'col-md-2';
}else{
$classes[] = 'col-md-4';
}
?>
<div <?php post_class( $classes ); ?>>
<div class="product-item">
<?php
/**
* woocommerce_before_shop_loop_item hook.
*
* @hooked woocommerce_template_loop_product_link_open - 10
*/
do_action( 'woocommerce_before_shop_loop_item' );
?>
<?php
/**
* woocommerce_before_shop_loop_item_title hook.
*
* @hooked woocommerce_template_loop_product_thumbnail - 10
* @hooked woocommerce_show_product_loop_sale_flash - 10
*/
do_action( 'woocommerce_before_shop_loop_item_title' );
?>
<div class="product-info">
<?php
/**
* woocommerce_shop_loop_item_title hook.
*
* @hooked woocommerce_template_loop_product_title - 10
*/
do_action( 'woocommerce_shop_loop_item_title' );
do_action( 'woocommerce_brands_link' );
?>
<?php
?>
</div>
</div>
</div>
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$name = htmlspecialchars($name);
$email = htmlspecialchars($email);
$phone = htmlspecialchars($phone);
$message = htmlspecialchars($message);
$name = urldecode($name);
$email = urldecode($email);
$phone = urldecode($phone);
$message = urldecode($message);
$name = trim($name);
$email = trim($email);
$phone = trim($phone);
$message = trim($message);
if (mail("SVOYU_POCHTU@mail.ru", "Заявка с сайта", "Телефон: ".$phone." Сообщение: ".$message. "ФИО:".$name.". E-mail: ".$email ." . From: SVOYU_POCHTU@mail.ru \r\n"))
{ echo "сообщение успешно отправлено";
} else {
echo "при отправке сообщения возникли ошибки";
}?>
/fsi.org.ua/
/fsi.org.ua/public_html/
<form action="mail.php" method="POST" class="form contacts-form">
<?php
$ppp = 4;
$current = $query->current_post + 1;
$loop = new WP_Query( array(
'posts_per_page' => $ppp,
'offset'=> 3
) ); ?>
<?php if ( $loop->have_posts() ) { ?>
<?php while ( $loop->have_posts() ) { $loop->the_post() ?>
<?php include 'parts/item.php'; ?>
<?php } ?>
<?php ?>
const anchors = document.querySelectorAll('a[href*="#"]')
for (let anchor of anchors) {
anchor.addEventListener('click', function (e) {
e.preventDefault()
const blockID = anchor.getAttribute('href').substr(1)
document.getElementById(blockID).scrollIntoView({
behavior: 'smooth',
block: 'start'
})
})
}
$input = new SimpleXMLElement(/* ... */);
foreach ($input->xpath('//product') as $product) {
foreach ($product->xpath('properties/property') as $i => $property) {
$product->addChild('property' . ($i + 1), $property->name->__toString() . ':' . $property->value->__toString());
}
unset($product->properties);
}
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mariadb-server
server {
listen 8083;
server_name _;
root /usr/local/vesta/web;
charset utf-8;
server {
listen panel.domain.ru:80;
server_name panel.domain.ru;
root /usr/local/vesta/web;
charset utf-8;
server {
listen domain.ru:80 default;
server_name domain.ru;
location / {
proxy_pass http://domain.ru:8080;
}
}
domain.ru
- Меняйте на тот домен, для которого выставляли A запись в DNS разделе(он же и в WEB разделе)nano /etc/cron.daily/vesta_ssl
#!/bin/bash
cert_src="/home/[USER]/conf/web/ssl.[DOMAIN].pem"
key_src="/home/[USER]/conf/web/ssl.[DOMAIN].key"
cert_dst="/usr/local/vesta/ssl/certificate.crt"
key_dst="/usr/local/vesta/ssl/certificate.key"
if ! cmp -s $cert_dst $cert_src
then
# Copy Certificate
cp $cert_src $cert_dst
# Copy Keyfile
cp $key_src $key_dst
# Change Permission
chown root:mail $cert_dst
chown root:mail $key_dst
# Restart Services
service vesta restart &> /dev/null
service exim4 restart &> /dev/null
fi
chmod +x /etc/cron.daily/vesta_ssl
./vesta_ssl