Free.ai WordPress Plugin
AI tools for WordPress. Content generation, images, and more.
Free.ai mō te WordPress
Ka tāpiri atu te whakanao i ngā ihirangi AI-powered, te hanganga whakaahua, te kupu-ki-te-whakaahua, me te whakamāoritanga ki tōna pae WordPress mā te whakamahi i ngā waehere poto me tātau REST API.
Ka tīmata tere: Ka whakatū te widget
Ko te huarahi tere rawa ki te tāpiri i AI ki tōna pae WordPress. Tahuri tēnei ki tētahi pātaka, tuhipoka, widget rānei mā te whakamahi i te kaiwhakawhanake HTML:
<script src="https://free.ai/widget.js" data-tool="chat"></script>
Ka tāpiri tēnei i tētahi whakawhitinga kōrero AI ki tōmu pātaka. Tirohia te Wīwī mō ngā utauta katoa e wātea ana.
Ko te pūāhua poto (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');
Kātahi ka whakamahia i roto i tētahi pou, i tētahi pou rānei:
[freeai prompt="Write a 100-word product description for organic coffee"]
Ka whakamahia ngā take mō WordPress
- Ka waihanga i ngā whakaahuatanga meta SEO mō ngā tuhipoka
- Ko te whakawhanaketanga o te whakaahua AI-powered mō ngā whakaahua whakaahua
- Ka whakamāoritia ngā pou ki ngā reo maha
- Hoatu te oro-ki-te-kōrero ki ngā tuhipānui
- AI te kōrerorero mō te tautoko manuhiri
- Ko te whakarāpopototanga ihirangi mō ngā tuhipānui āhua roa