Warning: include_once(/opt/1panel/www/sites/wordpress.la/index/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: No such file or directory in /www/sites/wordpress.la/index/wp-content/advanced-cache.php on line 22

Warning: include_once(): Failed opening '/opt/1panel/www/sites/wordpress.la/index/wp-content/plugins/wp-super-cache/wp-cache-phase1.php' for inclusion (include_path='.:/usr/local/lib/php') in /www/sites/wordpress.la/index/wp-content/advanced-cache.php on line 22

Deprecated: Array and string offset access syntax with curly braces is deprecated in /www/sites/wordpress.la/index/wp-content/plugins/custom-permalinks/frontend/class-custom-permalinks-frontend.php on line 498

Deprecated: Array and string offset access syntax with curly braces is deprecated in /www/sites/wordpress.la/index/wp-content/plugins/custom-permalinks/frontend/class-custom-permalinks-frontend.php on line 500

Warning: include(/opt/1panel/www/sites/wordpress.la/index/wp-content/plugins/wp-super-cache/wp-cache-base.php): failed to open stream: No such file or directory in /www/sites/wordpress.la/index/wp-content/plugins/wp-super-cache/wp-cache.php on line 95

Warning: include(): Failed opening '/opt/1panel/www/sites/wordpress.la/index/wp-content/plugins/wp-super-cache/wp-cache-base.php' for inclusion (include_path='.:/usr/local/lib/php') in /www/sites/wordpress.la/index/wp-content/plugins/wp-super-cache/wp-cache.php on line 95

Warning: include_once(/opt/1panel/www/sites/wordpress.la/index/wp-content/plugins/wp-super-cache/ossdl-cdn.php): failed to open stream: No such file or directory in /www/sites/wordpress.la/index/wp-content/plugins/wp-super-cache/wp-cache.php on line 118

Warning: include_once(): Failed opening '/opt/1panel/www/sites/wordpress.la/index/wp-content/plugins/wp-super-cache/ossdl-cdn.php' for inclusion (include_path='.:/usr/local/lib/php') in /www/sites/wordpress.la/index/wp-content/plugins/wp-super-cache/wp-cache.php on line 118
'plugin-1', 'id' => 'plugin-1', 'description' => '插件下载小工具', 'class' => 'plugin', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ) ); register_sidebar( array( 'name' => 'index-1', 'id' => 'index-1', 'description' => '首页小工具', 'class' => 'plugin', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ) ); register_sidebar( array( 'name' => 'news-1', 'id' => 'news-1', 'description' => '新闻分类小工具', 'class' => 'plugin', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ) ); '0','count'=>1), $atts)); $str1 = ''; $post_arr = query_posts('cat='.$category_id.'&showposts='.$count); foreach($post_arr as $val): $str2 .= '
  • ' . get_the_title( $val->ID ) . '
  • '; endforeach; wp_reset_postdata(); return $str1 . $str2 . $str3; } add_shortcode("Postcode",'post_shortcode'); function post_rand_shortcode($atts) { extract(shortcode_atts(array('category_id'=>'0','slug'=>'1','count'=>2), $atts)); $str1 = ''; return $str1 . $str2 . $str3; } add_shortcode("rand_post",'post_rand_shortcode'); function poll_shortcode($atts,$content=null) { $str = '
    '; return $str; } add_shortcode("poll",'poll_shortcode'); function custom_post_shortcode($atts) { extract(shortcode_atts(array('category'=>'0'), $atts)); $title = '
    ' . get_the_title() . '
    '; $time = '
    ' . get_the_time('l,Y/m/d H:i:s') . '
    '; $arr_post = sp_query_post(array( 'post_status'=>'publish', 'posts_per_page'=>-1, 'order'=>'ASC', 'meta_query' => array( array( 'key'=>'wp-codex', 'value'=>$category ) ) ), -1); $str1 = ''; foreach($arr_post as $val){ $str2 .= '
  • ' . $val['post_title'] . '
  • '; } return $title . $time . $str1 . $str2 . $str3; } add_shortcode("custom_post_1",'custom_post_shortcode'); function custom_postall_shortcode($atts) { extract(shortcode_atts(array('category'=>'0'), $atts)); $title = '
    ' . get_the_title() . '
    '; $time = '
    ' . get_the_time('l,Y/m/d H:i:s') . '
    '; $arr_post_3 = sp_query_post(array( 'post_status'=>'publish', 'posts_per_page'=>-1, 'order'=>'ASC', 'meta_query' => array( array( 'key'=>'wp-codex', 'value'=>'3' ) ) ), -1); $arr_post_3_1 = sp_query_post(array( 'post_status'=>'publish', 'posts_per_page'=>-1, 'order'=>'ASC', 'meta_query' => array( array( 'key'=>'wp-codex', 'value'=>'3-1' ) ) ), -1); $arr_post_3_2 = sp_query_post(array( 'post_status'=>'publish', 'posts_per_page'=>-1, 'order'=>'ASC', 'meta_query' => array( array( 'key'=>'wp-codex', 'value'=>'3-2' ) ) ), -1); $arr_post_3_3 = sp_query_post(array( 'post_status'=>'publish', 'posts_per_page'=>-1, 'order'=>'ASC', 'meta_query' => array( array( 'key'=>'wp-codex', 'value'=>'3-3' ) ) ), -1); $arr_post_3_4 = sp_query_post(array( 'post_status'=>'publish', 'posts_per_page'=>-1, 'order'=>'ASC', 'meta_query' => array( array( 'key'=>'wp-codex', 'value'=>'3-4' ) ) ), -1); $str1 = ''; foreach($arr_post_3 as $value3): switch ($value3['post_title']) { case '常用函数(上)': $str2 .= '
  • ' . $value3['post_title'] . '
  • '; break; case '常用函数(下)': $str2 .= '
  • ' . $value3['post_title'] . '
  • '; break; case '常用函数(中)': $str2 .= '
  • ' . $value3['post_title'] . '
  • '; break; case '模板标签': $str2 .= '
  • ' . $value3['post_title'] . '
  • '; break; default: $str2 .= '
  • ' . $value3['post_title'] . '
  • '; } endforeach; return $title . $time . $str1 . $str2 . $str3; } add_shortcode("custom_post_2",'custom_postall_shortcode'); have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); $i++; array_push($array,array( 'post_title'=>get_the_title(), 'post_permalink'=>get_permalink(), 'post_time'=>get_the_time('Y-m-d'), 'post_content'=>get_the_content() )); if( $i === $count ): break ; endif; endwhile; endif; wp_reset_postdata(); return $array; } function set_post_count($string) { $arr = array(); $post_arr = query_posts($string); foreach($post_arr as $val): array_push($arr, array( 'title'=>get_the_title( $val->ID ), 'permalink'=>get_permalink( $val->ID ) )); endforeach; wp_reset_postdata(); return $arr; } // 循环数组 function each_post($array){ foreach($array as $value){ $str .= '
  • ' . $value['post_title'] . '
  • '; } return $str; }' . $value . ''; } } } } //控制文章显示数量,依次首页,分类,标签 function iteblog_posts_per_page($query) { if (is_home()) { $query->set('posts_per_page', 10); } if (is_category()) { $query->set('posts_per_page', 10); } if( is_category(2208) ){ $query->set('posts_per_page',12); } if (is_tag()) { $query->set('posts_per_page', 10); } } add_action('pre_get_posts', 'iteblog_posts_per_page'); function catch_frist_image() { global $post; $first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('//iU', wp_unslash($post->post_content), $matches); if(empty($output)){ $first_img = "/wp-content/themes/generatepress/images/logoImg.jpg"; }else { //$first_img = $matches [1][0]; // 获取匹配到的第一张图片路径 $matched_img = trim($matches[1][0]); // 判断路径是否包含指定的fckeditor表情路径 if (strpos($matched_img, '/modules/fckeditor/fckeditor/editor/images/smiley/msn/') !== false) { // 包含表情路径,替换为默认图 $first_img = "/wp-content/themes/generatepress/images/logoImg.jpg"; } else { // 不包含表情路径,使用匹配到的图片路径 $first_img = $matched_img; } } return $first_img; } function sp_pagenavi( $range = 4 ) { global $paged,$wp_query; if ( !$max_page ) { $max_page = $wp_query->max_num_pages; } if( $max_page >1 ) { echo "
    "; if( !$paged ){ $paged = 1; } if( $paged != 1 ) { echo "首页"; } previous_posts_link('上一页'); if ( $max_page >$range ) { if( $paged <$range ) { for( $i = 1; $i <= ($range +1); $i++ ) { echo "$i"; } }elseif($paged >= ($max_page -ceil(($range/2)))){ for($i = $max_page -$range;$i <= $max_page;$i++){ echo "$i"; } }elseif($paged >= $range &&$paged <($max_page -ceil(($range/2)))){ for($i = ($paged -ceil($range/2));$i <= ($paged +ceil(($range/2)));$i++){ echo "$i"; } } }else{ for($i = 1;$i <= $max_page;$i++){ echo "$i"; } } echo '...'; next_posts_link('下一页'); if($paged != $max_page){ echo "尾页"; } echo "
    \n"; } } WordPress啦-WordPress主题模板插件分享 WordPress建站安装教程第114页

    热门资讯

    自动激活插件

    2011-03-09

    Fatal error: Uncaught Error: Call to undefined function catch_frist_image() in /www/sites/wordpress.la/index/wp-content/themes/generatepress/content.php:75 Stack trace: #0 /www/sites/wordpress.la/index/wp-includes/template.php(812): require() #1 /www/sites/wordpress.la/index/wp-includes/template.php(745): load_template() #2 /www/sites/wordpress.la/index/wp-includes/general-template.php(206): locate_template() #3 /www/sites/wordpress.la/index/wp-content/themes/generatepress/index.php(106): get_template_part() #4 /www/sites/wordpress.la/index/wp-includes/template-loader.php(106): include('/www/sites/word...') #5 /www/sites/wordpress.la/index/wp-blog-header.php(19): require_once('/www/sites/word...') #6 /www/sites/wordpress.la/index/index.php(18): require('/www/sites/word...') #7 {main} thrown in /www/sites/wordpress.la/index/wp-content/themes/generatepress/content.php on line 75