我需要一些帮助。我有一个可湿性粉剂主题(自定义)这是一个多年前开发的旧网站,我正在升级所有内容,我遇到一些需要帮助的错误,
First Error
WordPress数据库错误您的SQL语法有错误;检查与您的MariaDB服务器版本相对应的手册,以了解在第1行附近使用的正确语法,从wdir\\u术语中选择名称,其中term\\u id=made by require(\'wp-blog-header.php\')、require\\u once(\'wp-includes/template loader.php\')、do\\u action(\'template\\u redirect\')、wp\\u Hook->do\\u action、wp\\u Hook->apply\\u filters、call\\u user\\u func\\u array、inherit\\u template、,包括(“/主题/xxxxxx/archives/archive-6.php”),\\u get\\u category\\u name\\u by\\u ID
PHP致命错误:调用/wp-content/themes/xxxxxx/archives/archive-6中未定义的函数custom\\u permalinks\\u original\\u post\\u link()。php在线253
Section of code from archive-6.php
<p class="quickquotetext"><strong>Quick Quotes</strong>: <a href="#" class="quoteform">Click here</a> to email the "<? echo single_cat_title(); ?>" service providers in <?php echo _get_category_name_by_ID($_GET[\'cat\']); ?></p>
<?php } else { // this is the normal post loop?>
<? global $wp_query; global $post; query_posts(array_merge(array(\'posts_per_page\' => \'-1\', \'orderby\' => \'title\', \'order\' => \'ASC\'),$wp_query->query)); if (have_posts()) : while (have_posts()) : the_post();
custom_permalinks_original_post_link(get_the_ID());
ob_start();
the_attached_image(\'img_size=full&img_tag=false\');
$provider_logo = ob_get_clean();
if( has_post_thumbnail() ) {
$provider_logo = wp_get_attachment_image_src( get_post_thumbnail_id(), \'full\' );
$provider_logo = $provider_logo[0];
}
?>
Second Error 堆栈跟踪:
#0 /home/xxx/wp-content/plugins/category-icons/category_icons.php(1048): wpdb->prepare(\'CREATE TABLE IF...\')
#1 /home/xxx/wp-includes/class-wp-hook.php(286): ig_caticons_install(\'\')
#2 /home/xxx/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#3 /home/xxx/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#4 /home/xxx/wp-settings.php(450): do_action(\'init\')
#5 /home/xxx/wp-config.php(87): require_once(\'/home/ in /home/xxx/wp-includes/wp-db.php on line 1222
PHP Warning: Missing argument 2 for wpdb::prepare(), called in /home/xxx/wp-content/plugins/category-icons/category_icons.php on line 1048 and defined in /home/xxx/wp-includes/wp-db.php on line 1222