Free.ai WordPress Plugin
AI tools for WordPress. Content generation, images, and more.
Free.ai ye WordPress
Yongeza ukwenziwa kwezinto eziqulethe i-AI, ukwenziwa komfanekiso, umbhalo-uku-kuthetha, kunye nokuguqulela ngqo kwiwebhusayithi yakho ye-WordPress usebenzisa iikhowudi ezimfutshane kunye ne-REST API yethu.
Iqala ngokukhawuleza: Yenza i Widget
Indlela ekhawulezayo yokongeza i-AI kwinxuwa lakho le-WordPress. Ncamathisela le phepha, uxwebhu, okanye isixhobo usebenzisa umhleli we-HTML:
<script src="https://free.ai/widget.js" data-tool="chat"></script>
Oku kudibanisa umdibaniso wemida wencoko ye-AI kwiphepha lakho. Bona i iphepha le-Widget kuzo zonke izixhobo ezifumanekayo.
Ikhowudi efutshane yesiko (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');
Emva koko sebenzisa kulo naliphi na inqaku okanye iphepha:
[freeai prompt="Write a 100-word product description for organic coffee"]
Sebenzisa iimeko ze WordPress
- Yenza ngokuzenzekelayo i SEO meta inkcazelo yeposi
- Umfanekiso onamandla okudala i-AI yemifanekiso ephawulweyo
- Guqulela iposi kwiilwimi ezininzi ngokuzenzekelayo
- Yongeza umbhalo-uthetha-uthetha kwinqaku
- I-AI chatbot yoxhaso lomntu ofikayo
- Isishwankathelo semixholo yenqaku elifutshane