内容的栏目 * @param int $category 0列表 1频道 2单页 3外链 * @return array */ function category_list($forumlist, $model = 0, $display = 0, $category = 0) { if (empty($forumlist)) return NULL; static $cache = array(); $key = $model . '-' . $display . '-' . $category; if (isset($cache[$key])) return $cache[$key]; if ($display) { foreach ($forumlist as $k => $val) { if (1 == $val['display'] && 1 == $val['type'] && $val['category'] == $category) { $cache[$key][$k] = $val; } } } else { foreach ($forumlist as $k => $val) { if (1 == $val['type'] && $val['category'] == $category) { $cache[$key][$k] = $val; } } } return empty($cache[$key]) ? NULL : $cache[$key]; } /** * @param $forumlist 所有版块列表 不分模型 * @param int $display 0全部CMS栏目 1在首页和频道显示内容的栏目 * @param int $category 0列表 1频道 2单页 3外链 * @return array */ function category_list_show($forumlist, $display = 0, $category = 0) { if (empty($forumlist)) return NULL; static $cache = array(); $key = $display . '-' . $category; if (isset($cache[$key])) return $cache[$key]; if ($display) { foreach ($forumlist as $k => $val) { if (1 == $val['display'] && 1 == $val['type'] && $val['category'] == $category) { $cache[$key][$k] = $val; } } } else { foreach ($forumlist as $k => $val) { if (1 == $val['type'] && $val['category'] == $category) { $cache[$key][$k] = $val; } } } return empty($cache[$key]) ? NULL : $cache[$key]; } /** * @param $forumlist 所有版块列表 * @return mixed BBS栏目数据(仅列表) 尚未开放bbs频道功能 */ function forum_list($forumlist) { if (empty($forumlist)) return array(); static $cache = array(); if (isset($cache['bbs_forum_list'])) return $cache['bbs_forum_list']; $cache['bbs_forum_list'] = array(); foreach ($forumlist as $_fid => $_forum) { if ($_forum['type']) continue; $cache['bbs_forum_list'][$_fid] = $_forum; } return $cache['bbs_forum_list']; } // 导航显示的版块 function nav_list($forumlist) { if (empty($forumlist)) return NULL; static $cache = array(); if (isset($cache['nav_list'])) return $cache['nav_list']; foreach ($forumlist as $fid => $forum) { if (0 == $forum['nav_display']) { unset($forumlist[$fid]); } } return $cache['nav_list'] = $forumlist; } ?>Replace Woocommerce Images
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Replace Woocommerce Images

programmeradmin0浏览0评论

I have a running eCommerce site, but I've recently created new product imagery for the entire site. The new images are named identical to the old images, so would simply dumping them via FTP work? Could my customers still have old cached versions in their browser which don't update to the newer models? I'm trying to avoid having to go through every single product and manually set the new images. I'm open to buying a plugin if there's one that'll help me with this.

I have a running eCommerce site, but I've recently created new product imagery for the entire site. The new images are named identical to the old images, so would simply dumping them via FTP work? Could my customers still have old cached versions in their browser which don't update to the newer models? I'm trying to avoid having to go through every single product and manually set the new images. I'm open to buying a plugin if there's one that'll help me with this.

Share Improve this question asked Sep 2, 2016 at 5:22 RobRob 1411 silver badge2 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

Unfortunately, trying to pull a fast one on the WordPress media library with FTP won't work. You'll need to import them through the WP admin so they get added to the database, resized, and whatever other special sauce WP adds.

I've never used it, but this plugin sounds like it might be right up your alley. https://wordpress/plugins/enable-media-replace/

Well, this can be relative easy if all media library was uploaded via Wordpress, so an update via FTP can be done.

Once you have uploaded all new images (the main of each post), you have to run an update for thumbnails because WP takes the main image and creates thumbnails like: image20, the thumbnail will be image20-200x250 image20-640x380 and so on as your template requires. So via FTP you can update the main, but thumbnails need to be refreshed.

For this you can run a plugin https://wordpress/plugins/force-regenerate-thumbnails/ this will create new thumbnails and will and delete the ones you do not need on your template.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论