FastBots៖ បង្កើតផែនទីគេហទំព័រ XML WordPress ផ្ទាល់ខ្លួនសម្រាប់ការបណ្តុះបណ្តាល AI Bot របស់អ្នក។
Martech Zone មានអត្ថបទរាប់ពាន់ ដែលភាគច្រើននៃពួកគេហួសសម័យ។ ខ្ញុំបានធ្វើការនៅលើគេហទំព័រអស់រយៈពេលជាច្រើនឆ្នាំដើម្បីលុប ឬធ្វើបច្ចុប្បន្នភាពអត្ថបទរាប់រយ ប៉ុន្តែខ្ញុំនៅតែមានច្រើនទៀត។ ក្នុងពេលជាមួយគ្នានេះ ខ្ញុំចង់បណ្តុះបណ្តាល bot ភាសាធម្មជាតិជាមួយនឹងខ្លឹមសាររបស់ខ្ញុំ ប៉ុន្តែរឿងចុងក្រោយដែលខ្ញុំចង់ធ្វើគឺបណ្តុះបណ្តាលវានៅលើអត្ថបទដែលហួសសម័យ។
FastBots ជា ជជែក GPT-powered bot builder ដែលអ្នកអាចហ្វឹកហាត់ដំបូងដោយប្រើផែនទីគេហទំព័ររបស់អ្នក (ឬជម្រើសផ្សេងទៀត)។ ខ្ញុំត្រូវការផែនទីគេហទំព័រដែលបានត្រងដែលរួមបញ្ចូលអត្ថបទទាំងអស់ដែលបានកែប្រែចាប់តាំងពីកាលបរិច្ឆេទជាក់លាក់មួយ។ លើសពីនេះទៀតខ្ញុំចង់បញ្ចូលទំព័ររបស់ខ្ញុំនិង អក្សរកាត់ (ប្រភេទប្រកាសផ្ទាល់ខ្លួន)។ ខ្ញុំមិនចង់បញ្ចូលទំព័របណ្ណសារសម្រាប់ប្រភេទ និងស្លាក ឬមានទំព័រដើមរបស់ខ្ញុំទេ ព្រោះវាជាបណ្ណសារផងដែរ។
ដោយប្រើលេខកូដដែលខ្ញុំកំពុងផ្តល់នៅចុងបញ្ចប់នៃអត្ថបទនេះ; ខ្ញុំបានបង្កើតកម្មវិធីជំនួយ WordPress ផ្ទាល់ខ្លួនដែលបង្កើតផ្ទាល់ខ្លួន XML មាន ផែនទីគេហទំព័រដែលធ្វើឲ្យស្រស់ឡើងវិញរាល់ពេលដែលខ្ញុំបោះពុម្ពផ្សាយ។ FastBots មិនមានវិធីសាស្ត្របង្ហាត់ដោយស្វ័យប្រវត្តិដូចដែលខ្ញុំបោះផ្សាយអត្ថបទនីមួយៗ ប៉ុន្តែនេះជាចំណុចចាប់ផ្តើមដ៏ល្អសម្រាប់ការប្រើវេទិកា។
ផែនទីគេហទំព័រនាំចូលតំណភ្ជាប់ទាំងអស់ដើម្បីបណ្តុះបណ្តាល AI បូតនៅលើ៖
ឥឡូវនេះទំព័រទាំងអស់ត្រូវបាននាំចូល ហើយអ្នកអាចបណ្តុះបណ្តាល bot របស់អ្នកលើទិន្នន័យដែលអាចអនុវត្តបាន។ អ្នកក៏មានឱកាសលុបទំព័រជាក់លាក់ផងដែរ។ FastBots ក៏អនុញ្ញាតឱ្យខ្ញុំប្ដូរម៉ាកយីហោ AI bot របស់ខ្ញុំតាមបំណង ហើយថែមទាំងរួមបញ្ចូលតំណភ្ជាប់ទៅអត្ថបទដែលពាក់ព័ន្ធនៅក្នុងការឆ្លើយតបរបស់ខ្ញុំ។ វាក៏មានសំណើនាំមុខដែលបានបង្កើតឡើងនៅក្នុងវេទិកាផងដែរ។
វេទិកានេះដំណើរការដោយគ្មានកំហុស... អ្នកអាចផ្តល់ឱ្យ bot របស់ខ្ញុំនូវការធ្វើតេស្តសាកល្បងនៅទីនេះ៖
បើកដំណើរការ Martech Zone's Bot, Marty បង្កើត FastBots AI Bot របស់អ្នក។
ផែនទីគេហទំព័រ XML ផ្ទាល់ខ្លួន
ជាជាងបន្ថែមមុខងារនេះទៅក្នុងប្រធានបទរបស់ខ្ញុំ ខ្ញុំបានបង្កើតទម្លាប់មួយ។ WordPress កម្មវិធីជំនួយដើម្បីបង្កើតផែនទីគេហទំព័រ។ គ្រាន់តែបន្ថែមថតនៅក្នុងថតកម្មវិធីជំនួយរបស់អ្នកបន្ទាប់មក a កម្មវិធី PHP ឯកសារដែលមានលេខកូដខាងក្រោម៖
<?php
/*
Plugin Name: Bot Sitemap
Description: Dynamically generates an XML sitemap including posts modified since a specific date and updates it when a new article is added.
Version: 1.0
Author: Your Name
*/
// Define the date since when to include modified posts (format: Y-m-d)
$mtz_modified_since_date = '2020-01-01';
// Register the function to update the sitemap when a post is published
add_action('publish_post', 'mtz_update_sitemap_on_publish');
// Function to update the sitemap
function mtz_update_sitemap_on_publish($post_id) {
// Check if the post is not an auto-draft
if (get_post_status($post_id) != 'auto-draft') {
mtz_build_dynamic_sitemap();
}
}
// Main function to build the sitemap
function build_bot_sitemap() {
global $mtz_modified_since_date;
$args = array(
'post_type' => 'post',
'date_query' => array(
'column' => 'post_modified',
'after' => $mtz_modified_since_date
),
'posts_per_page' => -1 // Retrieve all matching posts
);
$postsForSitemap = get_posts($args);
// Fetch all 'acronym' custom post type posts
$acronymPosts = get_posts(array(
'post_type' => 'acronym',
'posts_per_page' => -1,
));
// Fetch all pages except the home page
$pagesForSitemap = get_pages();
$home_page_id = get_option('page_on_front');
$sitemap = '<?xml version="1.0" encoding="UTF-8"?>';
$sitemap .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
foreach($postsForSitemap as $post) {
setup_postdata($post);
if ($post->ID != $home_page_id) {
$sitemap .= '<url>'.
'<loc>'. get_permalink($post) .'</loc>'.
'<lastmod>'. get_the_modified_date('c', $post) .'</lastmod>'.
'<changefreq>weekly</changefreq>'.
'</url>';
}
}
foreach($acronymPosts as $post) {
setup_postdata($post);
if ($post->ID != $home_page_id) {
$sitemap .= '<url>'.
'<loc>'. get_permalink($post) .'</loc>'.
'<lastmod>'. get_the_modified_date('c', $post) .'</lastmod>'.
'<changefreq>weekly</changefreq>'.
'</url>';
}
}
foreach($pagesForSitemap as $page) {
setup_postdata($page);
if ($page->ID != $home_page_id) {
$sitemap .= '<url>'.
'<loc>'. get_permalink($page) .'</loc>'.
'<lastmod>'. get_the_modified_date('c', $page) .'</lastmod>'.
'<changefreq>monthly</changefreq>'.
'</url>';
}
}
wp_reset_postdata();
$sitemap .= '</urlset>';
file_put_contents(get_home_path().'bot-sitemap.xml', $sitemap);
}
// Activate the initial sitemap build on plugin activation
register_activation_hook(__FILE__, 'build_bot_sitemap');