CherryFramework3. 如何管理画廊缩略图裁剪和禁用裁剪的特色图像
March 24, 2016
Hello! 本视频教程展示了如何管理图库缩略图裁剪和禁用裁剪的特色图像 Cherry Framework 3 templates.
CherryFramework3. 如何管理画廊缩略图裁剪和禁用裁剪的特色图像您可能想要禁用某些图片的裁剪效果,因为您可能不喜欢它.
让我们学习一下怎么做.
禁用图库缩略图裁剪
-
Using your FTP/hosting Cpanel File Manager navigate to / wp-content /主题/ CherryFramework / directory and find the filterable-portfolio-loop.php file there:
-
将文件复制到 / wp-content /主题/ themeXXXXX / directory (where XXXXX 您的主题号码),以便您可以执行更改,而不会丢失它们的情况下 framework 将来会更新吗.
-
打开文件进行编辑,并查找以下代码字符串:
$image = aq_resize($img_url, $image_size['width'], $image_size['height'], true);
将其替换为以下代码:
$image = aq_resize($img_url, $image_size['width'], $image_size['height'], false);
你可以看到图库缩略图裁剪现在被禁用了:
请注意,您需要重新上传它们,以便它们适合图像 thumbnail container nicely.
禁用特色图像的裁剪
-
Navigate to / wp-content /主题/ CherryFramework /包括/ directory to locate the theme-function.php 文件并打开以进行编辑.
的代码 tz_image function 大约在线上 177–208:
复制此代码并将其粘贴到 custom-function.php file under / wp-content /主题/ themeXXXXX /包括/ directory (where XXXXX 是你的主题号)在结束PHP标签之前:
保存文件并检查您的站点以查看更改.
Changing the 网格库缩略图的大小
-
Navigate to / wp-content /主题/ CherryFramework /包括/ directory 再次打开 theme-function.php file for editing.
-
查找行上的代码 211-317,复制并粘贴到 custom-function.php file under / wp-content /主题/ themeXXXXX /包括/ directory 在结束PHP标记之前:
-
Change the first width and height values in the function 更改网格图库缩略图的大小:
-
保存文件并刷新页面以查看更改.
确保重新上传图库图像,以便应用更改.
本教程到此结束. 您已经学习了如何管理图库缩略图裁剪和禁用裁剪在您的 Cherry Framework 3 template.
请随时查看下面的详细视频教程:
CherryFramework3. 如何管理画廊缩略图裁剪和禁用裁剪的特色图像