Categories

有特色的模板

CherryFramework3. 如何管理画廊缩略图裁剪和禁用裁剪的特色图像

Andre Flores March 24, 2016
Rating: 5.0/5. From 2 votes.
Please wait...

Hello! 本视频教程展示了如何管理图库缩略图裁剪和禁用裁剪的特色图像 Cherry Framework 3 templates.

CherryFramework3. 如何管理画廊缩略图裁剪和禁用裁剪的特色图像

您可能想要禁用某些图片的裁剪效果,因为您可能不喜欢它.

让我们学习一下怎么做.

禁用图库缩略图裁剪

  1. Using your FTP/hosting Cpanel File Manager navigate to / wp-content /主题/ CherryFramework / directory and find the filterable-portfolio-loop.php file there:

    cherry3_manage_and_disable_images_cropping_1
  2. 将文件复制到 / wp-content /主题/ themeXXXXX / directory (where XXXXX 您的主题号码),以便您可以执行更改,而不会丢失它们的情况下 framework 将来会更新吗.

  3. 打开文件进行编辑,并查找以下代码字符串:

$image = aq_resize($img_url, $image_size['width'], $image_size['height'], true);

将其替换为以下代码:

$image = aq_resize($img_url, $image_size['width'], $image_size['height'], false);
cherry3_manage_and_disable_images_cropping_2

你可以看到图库缩略图裁剪现在被禁用了:

cherry3_manage_and_disable_images_cropping_3

请注意,您需要重新上传它们,以便它们适合图像 thumbnail container nicely.

禁用特色图像的裁剪

  1. Navigate to / wp-content /主题/ CherryFramework /包括/ directory to locate the theme-function.php 文件并打开以进行编辑.

  2. 的代码 tz_image function 大约在线上 177–208:

    cherry3_manage_and_disable_images_cropping_4
  3. 复制此代码并将其粘贴到 custom-function.php file under / wp-content /主题/ themeXXXXX /包括/ directory (where XXXXX 是你的主题号)在结束PHP标签之前:

    cherry3_manage_and_disable_images_cropping_5
  4. 保存文件并检查您的站点以查看更改.

Changing the 网格库缩略图的大小

  1. Navigate to / wp-content /主题/ CherryFramework /包括/ directory 再次打开 theme-function.php file for editing.

  2. 查找行上的代码 211-317,复制并粘贴到 custom-function.php file under / wp-content /主题/ themeXXXXX /包括/ directory 在结束PHP标记之前:

    cherry3_manage_and_disable_images_cropping_6
  3. Change the first width and height values in the function 更改网格图库缩略图的大小:

    cherry3_manage_and_disable_images_cropping_7
  4. 保存文件并刷新页面以查看更改.

确保重新上传图库图像,以便应用更改.

本教程到此结束. 您已经学习了如何管理图库缩略图裁剪和禁用裁剪在您的 Cherry Framework 3 template.

请随时查看下面的详细视频教程:

CherryFramework3. 如何管理画廊缩略图裁剪和禁用裁剪的特色图像
专业Wordpress主题
这个条目被张贴了出来 WordPress教程 and tagged CherryFramework3, cropping, disable, image. Bookmark the permalink.

Submit a ticket

如果您仍然无法找到关于您的问题的足够的教程,请使用以下链接向我们的技术支持团队提交请求. 我们将在接下来的24小时内为您提供我们的帮助和协助: Submit a ticket