朱纯树博客
VPS测评推荐网站
cloudacead cloudacead

WordPress纯代码实现给自定类型分类法投稿

目前本站使用的主题自带网址导航,但是没有投稿网址的功能,所以本站就琢磨怎么也得增加一个用户投稿网站的功能。

其实就是一个网站投稿的功能,但是并不是投稿到文章内,而是投稿给自定义分类发,也就是网址栏目,这就有点绕了。

经过一阵子搜索,终于找到实现投稿自定类型分类法方法了。

功能代码


$add_post = array(
        'post_type' => 'buluo',//类型
        'post_title' => $_POST['bbs_post_title'],// 标题
        'post_content' => $new_content, //内容
        'post_status' => 'pending',//提交是公开还是审核的
        'tax_input'=>array(
		'buluo_category'=>array($themes_id),//获取自定分类法id,buluo_category注意是您注册的分类法
         )
    );
$status = wp_insert_post( $add_post);//插入数据库

结合上面的代码,然后配合前台投稿表达,即可实现 投稿自定类型分类法方法了。

赞(3) 打赏
未经允许不得转载:VPS测评推荐网站 - 朱纯树博客 » WordPress纯代码实现给自定类型分类法投稿

评论 33

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #30

    The knight on the right do high blood pressure pills make you aroused is bloated, but his eyes look very energetic, These two are Rogge and Androni buy real cialis online Give maintenance dose BID

    Inefeby3周前 (03-05)回复
  2. #29
  3. #28

    Silver nanorod array surface enhanced Raman spectroscopy NA SERS is an investigational system that does not require growth of the bacterium order cialis Recreational use of Selective Androgen Receptor Modulator is allowed by the medical community but this doesn t involve SARMs use for bodybuilding

    Inefeby1个月前 (02-20)回复
  4. #27

    A total of 1, 523 Yak blood samples were tested using Rose Bengal Plate Test RBPT along with a competitive immune enzymatic assay c ELISA Zeng et al stromectol prescription

    DeettyhoW2个月前 (02-06)回复
  5. #26

    Doctors in New York reassessed her case and developed a plan surgery in New York, followed by chemotherapy during the second trimester of her pregnancy in Atlanta how to beat tamoxifen weight gain

    DeettyhoW2个月前 (02-01)回复
  6. #25

    In the process of turning fat into usable fuel, the liver will produce large amount of ketone bodies that will be released into the bloodstream generic cialis 20mg Furthermore, the mean ET decreased in the first 5 YSM, whereas it remained almost unchanged from 5 to 13 YSM, only to increase slightly during the rest of the postmenopausal years

    DeettyhoW2个月前 (01-27)回复
  7. #24

    Keeep thhis going please, gret job!

    5422个月前 (01-14)回复
  8. #23

    Woah! I’m really digging the template/theme of this blog.
    It’s simple, yet effective. A lot of times it’s tough
    to get that “perfect balance” between user friendliness
    and visual appearance. I must say you’ve done a awesome job with this.

    Additionally, the blog loads very fast for me on Safari.
    Excellent Blog!

    Feel free to surf to my web site – tracfone 2022

    tracfone 20224个月前 (11-26)回复
  9. #22

    Excellent blog here! Also your site loads up very fast! What host are you using?
    Can I get your affiliate link to your host? I
    wish my web site loaded up as quickly as yours lol

    Also visit my web blog :: coupon

    coupon8个月前 (08-12)回复
  10. #21

    It’s very straightforward to find out any matter on net as
    compared to books, as I found this post at this
    web site.

  11. #20

    Heya! I’m at work surfing around your blog from my new iphone 3gs!

    Just wanted to say I love reading your blog and look forward to all your
    posts! Carry on the superb work!

  12. #19

    I couldn’t refrain from commenting. Exceptionally well
    written!

    http://tinyurl.com8个月前 (08-01)回复
  13. #18

    obviously like your web-site however you need to test the spelling on several of your posts.
    A number of them are rife with spelling issues and I
    in finding it very troublesome to tell the truth however I will certainly come again again.

    • safe cialis online viagra growmax relief tablet At the time, Tourre, a French national, was 28 years old and working at Goldman Sachs in New York

      Inefeby2周前 (03-09)回复
  14. #17

    I’m gone to convey my little brother, that he should also pay a quick visit this blog on regular basis to obtain updated from
    latest gossip.

    tinyurl.com8个月前 (07-28)回复
    • cialis no prescription If the proportion of sensitive isolates x was reported, the number of resistant isolates was calculated by multiplying the number of total isolates y by one minus the proportion of sensitive isolates 1 x

      Inefeby2周前 (03-11)回复
  15. #16

    I was recommended this website by my cousin. I’m not sure whether this post is written by him as no one else know
    such detailed about my trouble. You’re incredible!
    Thanks!

    tinyurl.com8个月前 (07-28)回复
    • Thus, in one embodiment, the methods of the present invention comprise administering cis- clomiphene where to buy cialis online forum While acute heart failure is often self limited and reversible, delayed onset heart failure significantly reduces survival

      Inefeby3周前 (03-07)回复