Free.ai WordPress Plugin
AI tools for WordPress. Content generation, images, and more.
د وینډوز لپاره Free.ai
د AI-powered content generation، د انځور جوړول، د متن-to-speech، او ژباړه مستقیم ستاسو د WordPress سایټ ته د shortcodes او زموږ د REST API په کارولو سره اضافه کړئ.
چټک پېل: د څېرمه کړنلارې ضمیمه کول
د AI اضافه کولو ترټولو چټکه لاره ستاسو د وینډوز سایټ ته. د HTML مدیر په کارولو سره دا په هرې پاڼې، پوسټ یا ویډیو کې واچوئ:
<script src="https://free.ai/widget.js" data-tool="chat"></script>
دا ستاسو په پاڼه کې د AI غږیز انٹرفیس اضافه کوي. د ټولو شته وسیلو لپاره Widget پاڼه وګورئ.
دوديزه لنډه کوډه (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');
بیا په هر پوسټ یا مخ کې یې وکاروئ:
[freeai prompt="Write a 100-word product description for organic coffee"]
د WordPress لپاره قضیې وکاروئ
- د پوسټونو لپاره د SEO میټا توضیحات اتومات تولید کړئ
- د ځانګړي انځورونو لپاره AI-powered انځور نسل
- په څو ژبو کې په خپل سر د ليکنو ژباړې
- ليکنې ته د ويلو غږيزه ليکنه ليکنو ته زياتول
- د لیدونکو ملاتړ لپاره AI chatbot
- د اوږدو ليکنو لپاره د منځپانګې لنډيز