Free.ai WordPress Plugin
AI tools for WordPress. Content generation, images, and more.
Free.ai maka WordPress
Tinye AI-powered ọdịnaya generation, image creation, text-to-speech, na ntụgharị n'ụzọ ziri ezi na WordPress saịtị gị site na iji shortcodes na anyị REST API.
Ńkwádó:
Ụzọ dị n'ụzọ iji tinye AI na WordPress saịtị gị. Tinye nke a n'ọdịnihu ọ bụla, post, ma ọ bụ widget na-eji HTML editor:
<script src="https://free.ai/widget.js" data-tool="chat"></script>
Ọ na-egbakwunye n'etiti okwu AI n'ihuakwụkwọ gị. Gụọ Ihu widgetu maka ihenhọrọ niile dịnụ.
Shortcode emeredịkachọrọ (PHP)
Create a WordPress shortcode that calls the Free.ai API. Add this to your theme's functions.php:
function freeai_generate($atts) {
$atts = shortcode_atts(['prompt' => '', 'model' => 'qwen2.5-72b'], $atts);
$response = wp_remote_post('https://api.free.ai/v1/chat/completions', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Content-Type' => 'application/json',
],
'body' => json_encode([
'model' => $atts['model'],
'messages' => [['role' => 'user', 'content' => $atts['prompt']]],
]),
]);
if (is_wp_error($response)) return 'Error generating content.';
$body = json_decode(wp_remote_retrieve_body($response), true);
return '<div class="freeai-output">' .
esc_html($body['choices'][0]['message']['content'] ?? '') .
'</div>';
}
add_shortcode('freeai', 'freeai_generate');
Mgbe ahụ jiri ya na ọbụla post mọọbụ ihuakwụkwọ:
[freeai prompt="Write a 100-word product description for organic coffee"]
Jiri ihe omume maka WordPress
- Mepụta n'onwe gị SEO meta nkọwa maka ozi
- AI-powered inyogo mmepụta maka inyogo egosipụtara
- Gbanwee isiokwu ndị ahụ n'asụsụ ndị ọzọ n'onwe ya
- Tinye ngwe-ka-asụsụ ụda na isiokwu
- AI chatbot maka nkwado ndịọbịa
- Nkọwapụta ihenhọrọ maka isiokwu ndị dị ogologo