Home > CMS Tutorial > WordPress > body text

How to automatically access Xiongzhao account in wordpress

爱喝马黛茶的安东尼
Release: 2019-07-19 17:01:45
Original
2063 people have browsed it

How to automatically access Xiongzhao account in wordpress

Change "Your Xiong Zhang ID" to your real Xiong Zhang ID. To obtain the specific ID, you can log in to Xiong Zhang and click on the page modification to see it. See the picture below for details:

How to automatically access Xiongzhao account in wordpress

#This is only for the Nana theme. For other themes, this code is generally added to the header.php file of the theme.

"@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
            "@id": "<?php the_permalink();?>",
            "appid": "你的熊掌号ID"
Copy after login

How to automatically access Xiongzhao account in wordpress

Related recommendations: "WordPress Tutorial"

Here we need to modify the original Baidu real-time push function code of the Nana theme to Automatically submit to Xiongzhao. Open the functions.php file of Nana theme and find the following code:

How to automatically access Xiongzhao account in wordpress

Remember to modify "Your Xiongzhao ID" in the above code ” and “Your access key”, Xiong Zhang ID and access key can be obtained directly from Xiong Zhang’s content submission > API submission.

How to automatically access Xiongzhao account in wordpress

This code uses the custom field wzurl to determine whether it is original or non-original. According to the design of the Nana theme, non-original articles will have a custom field wzurl. The value is the source URL address of the article, so if you do not fill in the "original link address" below the editor when editing the article, even if you check the reprinted article or submitted article, it will be submitted to Xiong Zhang as an original article. Number. If you mind, you can modify the custom field wzurl in the above code.

How to automatically access Xiongzhao account in wordpress

How to automatically access Xiongzhao account in wordpress

The above is the detailed content of How to automatically access Xiongzhao account in wordpress. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template