Categories

有特色的模板

WordPress. 如何添加一个新的社会图标的社会短码(基于樱桃框架3.x)

Lana Greene April 15, 2015
Rating: 5.0/5. From 1 vote.
Please wait...

本教程展示了如何添加一个新的 social icon to the social shortcode 在WordPress(基于 Cherry Framework).

WordPress. 如何添加一个新的社会图标的社会短码(基于樱桃框架)

您应该检查社交图标是否在控件的帮助下创建 shortcode.

为了做到这一点,请检查所需的页面下面 页面-所有页面 在文本模式下找到以下内容 shortcode [social facebook_url= " # " twitter_url= " # " google_plus_url= " # "]:

how-to-add-a-new-social-icon-to-the-social-shortcode-based-on-Cherry-Framewor1

以便添加新的 social icon to the social shortcode,你应执行以下步骤:

  1. 找到文件 shortcode on your server.

    It will be in custom-function.php file located in wp-content /主题/ themeXXXX /包括 folder.

  2. 打开文件以使用任何代码进行编辑 editor 比如adobedreamweaver 8+、notepad++或其他软件 editor.

  3. 在文件中找到以下代码:

    函数social_shortcode($ ats, $content = null) {
      提取(shortcode_atts(数组(
      'facebook_url'    => '',
      'twitter_url'     => '',
      'google_plus_url' => '',
      'custom_class'    => '',
      ), $atts));
  4. 复制一行代码与社会图标之一,并将其粘贴到现有的社会图标代码下的新行.

  5. 更正代码中的值:

     'linked_in_url' => '',
  6. 在文件中找到以下代码:

     
      $output = '';
      
  7. 复制一行代码与社会图标之一,并将其粘贴到现有的社会图标代码下的新行.

  8. 更正代码中的值:

     $output .= '';

    how-to-add-a-new-social-icon-to-the-social-shortcode-based-on-Cherry-Framework-2

  9. 这些图标是在标志性字体的帮助下设置的-字体真棒. 要找到所需的图标,您将需要遵循此操作 link.

  10. 找到所需的图标.

  11. Copy its class:

    how-to-add-a-new-social-icon-to-the-social-shortcode-based-on-Cherry-Framework3

  12. 类的以下部分中粘贴类 social icon code:

    类= " icon-google-plus "
  13. 将更改保存在文件中.

  14. 现在,您应该将创建的图标添加到 shortcode 让它显示在网站上.

  15. 为了做到这一点,请检查所需的页面下面 Pages->All pages 在文本模式下找到以下内容 shortcode [social facebook_url= " # " twitter_url= " # " google_plus_url= " # "] :

  16. 复制现有的代码 social icon.

  17. 将其粘贴到最后一个图标旁边,就在 shortcode.

  18. 复制代码中的正确值:

    linked_in_url = " # "

    how-to-add-a-new-social-icon-to-the-social-shortcode-based-on-Cherry-Framework4

  19. Save changes.

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

WordPress. 如何添加一个新的社会图标的社会短码(基于樱桃框架)

响应式设计Wordpress主题
这个条目被张贴了出来 WordPress教程 and tagged icon, shortcode, social, WordPress. Bookmark the permalink.

Submit a ticket

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