小工具      在线工具  汉语词典  dos游戏  css  js  c++  java

linkedin 分享_如何在WordPress中添加官方LinkedIn共享按钮

java,python,javascript,php,vue,ViewUI 额外说明

收录于:23天前

领英分享

Do you want to add the official LinkedIn share button in WordPress? There are many 社交媒体插件 that let you add share buttons, but most of them don’t use the official buttons. In this article, we will show you how to add the official LinkedIn share button in WordPress.

您是否要在WordPress中添加官方LinkedIn共享按钮? 有许多社交媒体插件可让您添加共享按钮,但其中大多数不使用官方按钮。 在本文中,我们将向您展示如何在WordPress中添加官方LinkedIn共享按钮。

Adding LinkedIn share button in WordPress
在WordPress中添加官方LinkedIn共享按钮 Adding Official LinkedIn Share Button in WordPress

For this tutorial you’ll need to edit your WordPress theme files. If you haven’t done this before, then check out our guide on 如何在 WordPress 中复制和粘贴代码.

对于本教程,您需要编辑WordPress主题文件。 如果您以前没有做过,请查看有关如何在 WordPress 中复制和粘贴代码指南。

First, you need to visit the LinkedIn 分享插件 page. You will be asked to select your website’s language and the button style you want to use.

首先,您需要访问LinkedIn 分享插件页面。 系统将要求您选择网站的语言和要使用的按钮样式。

您可以将 URL 字段留空,因为共享按钮可以自动获取页面 URL。

您可以将 URL 字段留空,因为共享按钮可以自动获取页面 URL。

接下来,您需要单击“获取代码”按钮来复制 LinkedIn 共享按钮代码。

接下来,您需要单击“获取代码”按钮来复制 LinkedIn 共享按钮代码。

Copy the LinkedIn share button code

现在我们已经获得了共享代码,让我们在您的 WordPress 网站中添加官方按钮。

现在我们已经有了共享代码,让我们将官方按钮添加到您的 WordPress 网站。

在WordPress帖子和页面中显示LinkedIn共享按钮 Display LinkedIn Share Button in WordPress Posts and Pages

If you want to display the LinkedIn share button before your post content, then you can use the following code. You will need to copy and paste this code into your theme’s 函数.php file or in a 特定于站点的插件.

如果要在帖子内容之前显示LinkedIn共享按钮,则可以使用以下代码。 您将需要将此代码复制并粘贴到主题的函数.php文件或具体的在网站的插件中


function wpb_linkedin_share_before($content) { 
// Share code you copied from LinkedIn goes here
$sharecode .= '<script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
<script type="IN/Share" data-counter="top"></script>'; 
$newcontent = $sharecode .$content; 
return $newcontent; 
} 
add_filter('the_content', 'wpb_linkedin_share_before');

您可以保存更改并访问您的网站以查看其实际效果。

您可以保存更改并访问您的网站以查看它们的实际效果。

LinkedIn Share button in action

如果您想在帖子内容之后显示分享按钮,则需要添加以下代码。

如果想在帖子内容后显示分享按钮,则需要添加以下代码。



function wpb_linkedin_share_after($content) { 
$sharecode .= '<script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
<script type="IN/Share" data-counter="top"></script>'; 
$newcontent = $content . $sharecode; 
return $newcontent; 
} 
add_filter('the_content', 'wpb_linkedin_share_after');

You can also add the LinkedIn share button code you copied earlier directly into a WordPress custom HTML widget. Simply visit 外观 » 小部件 page and add the ‘Custom HTML’ widget to a sidebar.

您还可以将您先前复制的LinkedIn共享按钮代码直接添加到WordPress自定义HTML小部件中。 只需访问外观 » 小部件页面,然后将“自定义HTML”小部件添加到侧边栏中。

接下来,在自定义 HTML 小部件中添加您的 LinkedIn 共享按钮代码,然后单击保存按钮来存储您的更改。

接下来,将您的 LinkedIn 共享按钮代码添加到自定义 HTML 小部件,然后单击“保存”按钮来存储您的更改。

Linkedin button in a sidebar widget

您现在可以访问您的网站以查看其运行情况。

现在您可以访问您的网站以查看其运行情况。

LinkedIn share button in sidebar

We hope this article helped you learn how to easily add the official LinkedIn share button in WordPress. You may also want to see our list of the 适用于 WordPress 的最佳 LinkedIn 插件.

我们希望本文能帮助您学习如何轻松地在WordPress中添加官方LinkedIn共享按钮。 您可能还希望查看我们适用于 WordPress 的最佳 LinkedIn 插件列表。

If you liked this article, then please subscribe to our YouTube 频道 for WordPress video tutorials. You can also find us on 推特 and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube 频道 WordPress视频教程。 您也可以在推特Facebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-add-official-linkedin-share-button-in-wordpress/

领英分享

. . .

相关推荐

额外说明

STM32CubeIDE配置

STM32CubeIDE配置 1. 生成bin、Hex文件 2. 查看h文件包含路径 3. 工程中添加用户文件夹(C文件) 4. 添加头文件路径 5. 注释显示中文 6. 单个文件最大行数设置 7. 自定义ld文件 8. 修改字体 9. 切换视图 1.

额外说明

DOM ------ 节点

节点概述 : 节点至少拥有nodeType(节点类型) nodeName(节点名称) nodeValue(节点值)这三个基本属性 元素节点 : nodeType 为 1, HTML 标签元素 元素节点主要提供了对元素标签名 子节点及属性的访问 属性节点

额外说明

【python】【robotics】指定日期规则自动运行自动化脚本

【背景】 公司瘦客户端可以通过开源脚本平台Taskt完成多种多样的Robotics自动化操作任务,但是瘦客户端上Windows的计划任务功能被阉割,而且就算不阉割也涉及权限等等,感觉不是很好用,也无法满足刨除非营业日等细节的自动化出发需求,所以还是用Py

额外说明

【Unity ShaderGraph】| 如何快速制作一个炫酷 模型裁剪效果 实战

前言 【Unity ShaderGraph】| 如何快速制作一个炫酷 模型裁剪效果 实战 一、效果展示 二、简易裁剪效果 三、进阶裁剪效果 四、应用实例 前言 本文将使用Unity 的ShaderGraph制作一个模型裁剪的效果,可以直接拿到项目中使用。

额外说明

【鸿蒙软件开发】ArkTS基础组件之DataPanel(数据面板)、DatePicker(日期选择)

文章目录 前言 一、DataPanel数据面板 1.1 接口 参数介绍 1.2 属性 1.3 DataPanelType枚举说明 1.4 深度剖析number[]参数 1.5 示例代码 二、DatePicker日期选择 2.1 接口 参数说明 2.2 属

额外说明

SVN不提交.projects .settings target等文件

开发工具: Eclipse Maven  SVN 当我们写完代码提交到版本库的时候,SVN插件往往会把.classpath,.settings之类的文件一并提交。如果我们使用了maven,还会把target一起提交,这并不是我们想要的,除了我们自己可以注

额外说明

git的本地分支如何关联远程分支,比如github,gitlab,码云等

文章目录 1. 文章引言 2. 本地分支如何关联远程分支 2.1 远程有分支 2.2 远程无分支 3. 总结 1. 文章引言 今天发布某版本的项目,准备创建个v0point1分支,后期如果修改该版本,直接在该分支上修改即可。 首先,使用git branc

额外说明

报错:Possible Unhandled Promise Rejection: TypeError: Cannot read properties of undefined (read

Possible Unhandled Promise Rejection: TypeError: Cannot read properties of undefined (reading 'protocol')    发现是在 main.js 引用错误。

额外说明

【已解决】CUDA Error:no kernel image is available for execution on the device:No such file or directory

目录 1 问题背景 2 问题探索 3 问题解决 4 告别Bug 1 问题背景 环境: Ubuntu20.04 CUDA 11.4 显卡:Nividia GeForce MX130 现象:在一台旧机器上通过Makefile编译Darknet时报错 2 问题

额外说明

Windows系统mqdscli.dll文件丢失找不到的解决办法

其实很多用户玩单机游戏或者安装软件的时候就出现过这种问题,如果是新手第一时间会认为是软件或游戏出错了,其实并不是这样,其主要原因就是你电脑系统的该dll文件丢失了或没有安装一些系统软件平台所需要的动态链接库,这时你可以下载这个mqdscli.dll文件(

ads via 小工具