How to display the WeChat QR code of the website or customize social media links?

Calendar 👁️ 98

In today's digital marketing age, the close integration of websites with social media is crucial for enhancing user engagement and brand influence.AnQiCMS as an efficient content management system fully considers the user's needs and provides a flexible and convenient way to display the website's WeChat QR code and various custom social media links.In order to facilitate users to add WeChat consultation or guide them to visit your Facebook, Twitter and other platforms, AnQiCMS can help you easily achieve this, making your website a bridge connecting users.

Step 1: Configure contact information and social media information in the background

First, you need to log in to the AnQiCMS backend management interface, find“Background Settings”ofthe "Contact Information Settings"options. This page is where you can centrally manage all contact information.

On this page, you will see some preset contact information fields, such as 'Contact Person', 'Contact Phone', 'Contact Email', as well as 'WeChat ID' and 'WeChat QR Code'.For WeChat QR code, simply click the upload button and select the QR code image you have prepared.The system will automatically save and manage this image properly.

The strength of AnQiCMS lies in its high customizability. If the preset social media platforms (such as QQ, WhatsApp, Facebook, Twitter, Tiktok, Pinterest, Linkedin, Instagram, Youtube) do not fully meet your needs, or you want to add some more personalized social media entries, you can do so through the page below."Custom Setting Parameters"To implement the function. Click "Add Parameter" to set a "Parameter Name" for your new social media link (for example:TelegramLink),and fill in the corresponding “parameter value” (i.e., the link address). Don't forget to add a “note” for future management and identification. For example, you can set the parameter name toTelegramLinkParameter value enteredhttps://t.me/your_channelNote: 'Telegram group link'.

After saving these settings, you have successfully configured all the necessary contact information and social media information on the AnQiCMS backend.

Step two: Call and display this information in the website template

After completing the background configuration, the next step is to display this information on the website's frontend.AnQiCMS uses a tag system similar to the Django template engine, making it very intuitive to call these contact methods in the template.You will mainly use a name calledcontacttags.

The common syntax of this tag is{% contact 变量名称 with name="字段名称" %}. Among them,字段名称These are the field names you filled in the "Contact Information Settings" in the background, such asWechat/QrcodeOr customizedTelegramLinketc.

1. Show WeChat QR code:To show the WeChat QR code, you can place it in the footer of the website (usuallypartial/footer.html), in the sidebar or a dedicated “Contact Us” page, use<img>Label collaborationcontacttags to call.

<div class="wechat-qr">
    <span>关注我们的微信:</span>
    <img src="{% contact with name="Qrcode" %}" alt="微信二维码" class="responsive-image" />
</div>

Thus, the QR code images you upload on the backend will automatically display on the website.

2. Display WeChat personal number or WeChat ID text:If you only want to display the WeChat ID text for easy copying and adding, you can call it like this:

<p>我们的微信号:{% contact with name="Wechat" %}</p>

3. Show other preset social media links:For other social media links, such as your Facebook homepage link, you can call it like this:

<p>访问我们的Facebook:<a href="{% contact with name="Facebook" %}" target="_blank" rel="nofollow noopener">点击这里</a></p>

You can replace it as neededname="Facebook"Withname="Twitter"/name="Instagram"with the corresponding preset fields.

4. Display your custom social media link:If you have customizedTelegramLinkSo when calling in the template, just use the parameter name you set:

<p>加入我们的Telegram群组:<a href="{% contact with name="TelegramLink" %}" target="_blank" rel="nofollow noopener">Telegram</a></p>

Important reminder: About|safeFilterIt is worth noting that when you enter content containing HTML code in the custom field in the background (such as complex social media icon codes, or a segment of JavaScript code), when calling the template, in order to ensure that the content can be parsed correctly and not escaped as plain text, you may need to add after the variable|safea filter. For example:{{ customHtmlContent|safe }}. But for image URLs or plain text links, usually no additional processing is required.

By following these simple steps, you can flexibly display your WeChat QR code and various social media links on the AnQiCMS website, greatly enhancing the interactivity and user experience of the site.AnQiCMS powerful content management capabilities make your website not just a carrier of content, but also a powerful tool for connecting users and expanding brand influence.


Frequently Asked Questions (FAQ)

Q1: Why didn't the front-end page update after I modified the WeChat QR code or social media link in the "Contact Information Settings" in the background?A1: This is usually due to website caching. In AnQiCMS, in order to improve website access speed, the system generates cache.After you modify the data in the background, the front-end page may not immediately reflect these changes.You can try to find the "Update Cache" button in the background management interface (usually in the top navigation bar or sidebar), click to clear all caches, and then refresh the front-end page to see the latest modifications.

Q2: Can I add an icon instead of plain text in a custom social media link?A2: Of course you can. In the background "Contact Information Settings" under "Custom Parameter Settings", when you fill in the "Parameter Value", you can directly enter HTML code, such as icons.<i>tags or<img>Tags, as well as links. For example, you can enter the parameter value as<a href="https://t.me/your_channel" target="_blank"><img src="/path/to/telegram-icon.png" alt="Telegram"></a>. When calling the template, to ensure that these HTML codes are correctly parsed by the browser, you need to add the variable after|safefor example:{{ telegramLinkVar|safe }}.

How can I make my social media link open in a new window or tab?A3: This is a standard HTML attribute setting. When you are building your social media link's<a>Add in the tag,target="_blank"Just attributes. For example:<a href="您的链接地址" target="_blank" rel="nofollow noopener">点击访问</a>Recommended to add at the same time,rel="nofollow noopener"Property,nofollowTell the search engine not to track this link,noopenerIt can enhance security, prevent new pages from accessing the original page.window.openerObject.

Related articles

How to display the contact information, phone number, address, and other contact methods set on the website?

In modern website operation, clearly displaying the company's contact information is a key link in building trust and facilitating communication with users.AnQiCMS (AnQiCMS) knows this well, providing you with an intuitive and flexible backend settings, allowing you to easily manage and display the contact information, phone number, address and other information of the website.This article will introduce in detail how to set and display these important contact information in Anqi CMS.### One, configure your contact information in the Anqi CMS backend All contact information displayed on the website front end first needs to be unified managed in the Anqi CMS backend

2025-11-09

How to display breadcrumb navigation on a page to improve user experience?

In modern web design, breadcrumb navigation has become a standard element to enhance user experience and website usability.It acts as a guide for users to advance, clearly showing the user's current position in the website's hierarchy structure and providing a convenient way to return to the parent page.For websites built using AnQiCMS, integrating breadcrumb navigation can greatly facilitate visitors and also play a positive role in search engine optimization (SEO).Why is breadcrumbs navigation so important? Imagine

2025-11-09

How to display the website filing number and copyright information in the footer?

In website operation, the website footer usually contains important information, such as filing number and copyright statement.This information is not only a manifestation of the website's compliance, but also a window for displaying the website's professionalism.AnQiCMS provides a convenient way to manage and display this information.We will introduce in detail how to display the filing number and copyright information in the footer of the AnQiCMS website.

2025-11-09

How to display the website name and logo in the template?

The website's name and logo, like a person's name and face, are an indispensable symbol.They are not only the core of the brand image, but also the key to improving the professionalism of the website, enhancing user trust, and making it easy to remember.In AnQiCMS, elegantly present these important identification elements in the website template, simpler and more flexible than you imagine.Understanding the basic settings of AnQiCMS website In AnQiCMS, the basic information of the website such as the name and Logo is concentrated in the background "Global Function Settings".You can log in to the back end and navigate to

2025-11-09

How to display the user comment list on the article detail page?

User comments are an indispensable part of the website content ecosystem. They not only effectively enhance content interactivity and user engagement, but also bring a richer UGC (User Generated Content) to the website, helping with SEO optimization and fostering a community atmosphere.AnQiCMS as a powerful content management system has fully considered this need, providing you with a flexible and efficient way to integrate the user comment list into your article detail page.

2025-11-09

How to integrate the comment submission form and handle user comments?

In modern website operations, user comments are an important way to enhance the interactivity and activity of content.AnQiCMS (AnQiCMS) offers a powerful and flexible comment feature, allowing you to easily integrate a comment submission form on your website and effectively manage user comments.Next, we will explore how to achieve this goal in AnQiCMS together.

2025-11-09

How to implement the like function for comments?

User interaction is an important manifestation of website vitality, which can significantly enhance the attractiveness and user stickiness of content.AnQi CMS is a powerful and highly customizable content management system that provides a rich set of features to enhance user engagement.Among them, the comment function is the core battlefield of user communication, and adding a like function to the comments can undoubtedly further stimulate community vitality and allow users to give more direct and positive feedback to high-quality comments.### Overview of AnQi CMS Comment Function AnQi CMS is built-in with a comprehensive comment management system, allowing website visitors to easily comment on articles

2025-11-09

How to build a custom website contact form?

The website feedback form is an important bridge for interaction between the website and visitors. Whether it is to collect user feedback, customer inquiries, or other interactive needs, a well-designed and functional feedback form is crucial.In Anqi CMS, building a custom message form is much simpler and flexible than you imagine.The built-in 'website message' function provides a powerful basic framework, allowing us to customize deeply according to actual needs. Next, we will discuss in detail how to build a custom message form in Anqi CMS that meets your specific needs.

2025-11-09