wordpress参考链接

  • wordpress添加自定义页面:https://jingyan.baidu.com/article/c33e3f48d49202ea14cbb565.html
  • wordpress让文章也使用模板:http://www.seo628.com/3428.html
  • wordpress获取文章标题:http://www.seo628.com/2555.html
  • wordpress获取文章简介:https://www.xuewangzhan.net/wpbbs/24684.html
  • worepress调用文章:https://blog.csdn.net/weixin_42385932/article/details/93327762
  • wordpress调取函数大全:https://www.cnblogs.com/gcy77/p/4017658.html
  • wordpress插件:http://baijiahao.baidu.com/s?id=1598178740904523309&wfr=spider&for=pc
  • 获取wordpress文章图片调用:

function.php:(加入这段代码)

function catch_that_image() {
    global $post, $posts;
    $first_img = '';
    ob_start();
    ob_end_clean();
    $output = preg_match_all('//i', $post->post_content, $matches);
    $first_img = $matches [1] [0];
    if(empty($first_img)){ //Defines a default image
        $first_img = "http://192.168.2.2/wp-content/uploads/2019/10/01e6da22-f471-4c2e-b5f3-b45b43f54025.jpg";
    }
    return $first_img;
}

自定义页面获取图片:

 

  • worepress长文章分页:https://www.xuewangzhan.net/wpbbs/8460.html

你可能感兴趣的:(worepress)