doucheng1063 2015-11-08 03:21 采纳率: 100%
浏览 172

如何将数据附加到wordpress中的wp_post和wp_postmeta表?

I am building a site that has a list of stores.

How can I add my store info to wp_post and wp_postmeta so I don't have to manually add them in dashboard?

  • 写回答

1条回答 默认 最新

  • duanchui1279 2015-11-08 07:59
    关注

    You don't to modify the posts in database for that. You can simply add your desired modification at the end of post content every time a post is being displayed.

    function my_function($content) {    
        $content .= 'My Store Info';
        return $content;
    }
    add_filter('the_content', 'my_function');
    
    评论

报告相同问题?

悬赏问题

  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号