Copywriter, webmaster, product manager, architect, independent developer.
js problems are all asynchronous problems.
WordPress also loads various js in a certain order. WordPress basically loads its own js first, and then loads its own defined js.
$(function(){})
In this way, if you encounter the following problems
uncaught typeerror: $ is not a function
You can change the way of writing
jQuery(function($){})
Recently, I have discussed with many friends the topic of what "GPT" can be used for. Sort it out. 1. SEO and self-media creation in 2018 […]
In the past two years, there has been an obvious trend.
More and more artificial intelligence software and hardware products are emerging.
Most of these products are used in various fields such as smart cities, AIOT, edge computing, smart agriculture, smart factories, robots, etc.
This general direction will only become more and more promising in the future.
Compared with the purely information-dimensional metaverse, this is a product direction that can directly intervene in the real world, profoundly affect the world, and ultimately lead to large-scale iterations in all directions of the entire society.
These two rules are both correct, but the first one succeeds and the second one fails. I don’t know why.
//This is successful. / ]*>/g //This failed. /<\/?a.*?>/g
1. Changes of the Times and Business Opportunities 1. The Age of Carriages and the Age of Cars Before the emergence of automobiles, horse-drawn carriages were an important means of transportation. After the advent of automobiles, horse-drawn carriages […]
I've been iterating my own wordpress theme recently.
It is very common to obtain the term data of category and post-tag, two existing WordPress taxonomies, in the archive, and both have ready-made parameters and functions.
How to get the term data of custom taxonomy in archive?
get_queried_object()
This function can not only obtain the term data of custom taxonomy, but also the data of category and post-tag. Even if it is an archive of a custom post type, you can also get the current post type data.
$term_data = get_queried_object();//In archive.php, use it directly.
URL on wordpress official website: https://developer.wordpress.org/reference/functions/get_queried_object/
You can also get the current post and user data. However, I haven't tried these two.
Recently, for one of my websites, Baseon WordPress, the Gutenberg editor could not be used. When I opened it, the page was blank. I always thought it was caused by upgrading wordpress to v6.2 some time ago. I just figured it out today. It turns out that there is an extra "}" in a js file I wrote myself.
After removing this "}", the Gutenberg editor returns to normal.
Record a question: $_SERVER['SERVER_NAME'] is the first domain name in the list of domain names bound to the host.
1. Drawing water from a bamboo basket Many years ago, during the personal website era, I made many websites, and several of them had relatively large traffic. I also made some money from this traffic. However, there is a question […]
E-commerce is all about traffic and conversions. Logistics, supply chain, payment, etc. are all undergoing transformation. It is also the infrastructure of e-commerce. 1. Overseas e-commerce 1. Asia […]