Login

notes

Google Gemini API Development Guide: How to integrate Google Gemini into your websites and projects?

Last month, Google released Gemini. Immediately afterwards, I developed AI SEO based on Google Gemini - automatic and […]

How to solve the problem of connecting to gethub: Failed to connect to github.com port 443

Problem I have been having this problem in the past few days: Failed to connect to github.com port 44 […]

How to get a lot of traffic quickly with AI SEO WordPress Plugin?

Although the AI SEO WordPress plugin is designed to automate many SEO tasks, it is not designed to obtain rankings and traffic in batches […]

How to apply to use Baidu Wenxin large model?

My AI SEO WordPress plugin released a CN version today. AI SEO CN WordPress Plugin Subscription […]

The plugin generated 2 characters of unexpected output during activation.

I developed a plug-in myself, and the following error occurred when activating it: The plug-in generated 2 characters of […]

AI SEO: WordPress SEO plugin based on Google Gemini developed by me

WordPress Plugin AI SEO AI SEO: Automate and batch generate search engine-friendly articles. December 2023 […]

Time:2023/12/09

WordPress migration and upgrade: solve problems such as white pages, 404, pseudo-static, plug-in installation failure, plug-in update failure and inaccessibility, etc.

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.

white pages

Uninstalled several plug-ins and uninstalled the theme I developed: themoon. That solved the problem.

404 and pseudo-static

The new server is nginx. Need to be added to the configuration:

location / { try_files $uri $uri/ /index.php?$args; }

Plug-in installation failed and update also failed

1. Set the permissions of the plugins directory to 777, and by the way, set the permissions of the themes directory to 777.

2. Enable PHP functions in PHP.ini: chmod

Without enabling this function, WordPress cannot install and update plugins.

After the plug-in update failed, the entire site became inaccessible.

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.

tags:

Nuxt’s ultimate internationalization solution: I18n+Nuxt Content

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 […]

What is AIGC: Understand AIGC in one article

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.

Time:2023/11/06

Record it, wordpress, get the page ID

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;
tags:


copyright © www.lyustu.com all rights reserved.
Theme: TheMoon V3.0. Author:neo yang