Last month, Google released Gemini. Immediately afterwards, I developed AI SEO based on Google Gemini - automatic and […]
Problem I have been having this problem in the past few days: Failed to connect to github.com port 44 […]
Although the AI SEO WordPress plugin is designed to automate many SEO tasks, it is not designed to obtain rankings and traffic in batches […]
My AI SEO WordPress plugin released a CN version today. AI SEO CN WordPress Plugin Subscription […]
I developed a plug-in myself, and the following error occurred when activating it: The plug-in generated 2 characters of […]
WordPress Plugin AI SEO AI SEO: Automate and batch generate search engine-friendly articles. December 2023 […]
In the past two days, I have migrated my blog and upgraded it to the latest wordpress 6.4.2. Many problems arose in the process and were solved one by one.
Record it.
Uninstalled several plug-ins and uninstalled the theme I developed: themoon. That solved the problem.
The new server is nginx. Need to be added to the configuration:
location / { try_files $uri $uri/ /index.php?$args; }
Without enabling this function, WordPress cannot install and update plugins.
Tip: "Please wait one minute..."
In fact, that's how it's always been.
All you need to do is log in to the server via FTP, find the .maintenance file in the root directory, delete it, and that's it.
With the tide of going overseas, Vue and Nuxt, which are widely used in China, often face internationalization problems. If it is wordpress, it is simple, install […]
AIGC refers to AI-generated content, which involves artificial intelligence generating text, pictures, videos, etc. based on prompts. Originated in 2022, the large language model is its foundation, interacting with AI agents through prompt words, context and AI. AIGC has begun to change the content industry and accelerate production efficiency. It is currently used in many directions such as chat robots and content generation, and has given rise to an industrial ecosystem with large model capabilities as its core.
I have always used
global $post; $id=$post->ID;
I just found out today that there is a problem.
If you add a shortcode to the page, and the shortcode outputs a list (such as a list of articles in a certain category), then this method cannot get the page ID.
That is to say, if there is a loop in the page, then the above method cannot obtain the page ID.
List several methods to obtain the page ID:
1.global
Affected by circulation.
global $post; $id=$post->ID;
2,get_the_ID()
Affected by circulation.
$postid = get_the_ID(); echo $postid;
3.get_queried_object_id()
Not affected by circulation. recommend.
$current_id = get_queried_object_id(); echo $current_id;
4.get_queried_object()
Not affected by circulation.
$object = get_queried_object(); $id = $object -> ID; echo $id;