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 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题