This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.cp 文件到s3,并设置为public权限: | |
| aws s3 cp images s3://adwords.yeahmobi.com/wp-content/themes/hanrm-cn/assets/images --recursive --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers | |
| 2.递归删除s3上目录下的所以文件: | |
| aws s3 rm --recursive s3://adwords.yeahmobi.com/wp-content/themes/hanrm-cn/assets/images/ | |
| 3.列出s3某个目录下的所以文件: | |
| aws s3 ls s3://adwords.yeahmobi.com/wp-content/ |
OlderNewer