This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 上传文件并删除原文件(主题) | |
sudo rm -rf greenherb && sudo wget http://ftpsin.ymtech.info:8888/logtmp/ftp/xiongwei.shang/site.zip && sudo unzip site.zip | |
## 修改用户组权限并mv文件 | |
sudo chown www:www -R /home/wwwroot/trueniu-php/trueniu/wp-content/themes && sudo rm -rf /home/wwwroot/trueniu-php/trueniu/wp-content/plugins/wordpress-seo && sudo mv wordpress-seo /home/wwwroot/trueniu-php/trueniu/wp-content/plugins/ | |
## 修改nginx配置文件 | |
sudo vi /usr/local/nginx/conf/vhost/trueniu/trueniu.conf | |
## 证书上传 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@superz ~]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf | |
[root@superz ~]# /usr/local/nginx/sbin/nginx -s reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$products_tags = get_the_term_list($product_id, 'product_tag'); | |
echo $products_tags; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$thumbnail_id = get_woocommerce_term_meta($item->term_id, 'thumbnail_id', true); | |
$thumb = wp_get_attachment_url($thumbnail_id); | |
echo '<img src="'. $thumb .'" alt="'. $title .'">'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1: get_terms | |
$args = array( | |
'taxonomy' => 'product_cat', | |
'hierarchical' => 1, | |
'show_option_none' => '', | |
'hide_empty' => 0, | |
'include' => '17,18,19,20', | |
'orderby' => 'term_id', | |
'order' => 'ASC' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /phone/ { | |
if (!-e $request_filename){ | |
rewrite ^/(.*)$ /phone/index.php last; | |
} | |
} | |
location /newtravel/ { | |
if (!-e $request_filename){ | |
rewrite ^/(.*)$ /newtravel/index.php last; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$thumbnail_info = get_post( get_post_thumbnail_id() ); | |
$thumbnail_info->post_excerpt; //图像说明 | |
$thumbnail_info->post_content //图像描述 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $post; | |
$args = array( | |
'posts_per_page' => 1, | |
'post_type' => 'product', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'product_cat', | |
'field' => 'term_id', | |
'terms' => $item->term_id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $withcomments; | |
$withcomments = 1; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $product; | |
$downloads = $product->get_downloads(); | |
foreach( $downloads as $download ) : | |
?> | |
<a href="<?php echo $download['file']; ?>"><?php echo $download['name']; ?></a> | |
<?php endforeach; ?> |
OlderNewer