最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

pods framework - Define option outside wp-config.php (on WordPress.com)

programmeradmin2浏览0评论

Using the PODS plugin. I need to add nested shortcode support which normally would be in the wp-config.php, but wordpress does not allow editing the core WordPress files.

The change is:

define('PODS_SHORTCODE_ALLOW_SUB_SHORTCODES', true);

Is there an alternate way of defining this and achieving similar functionality?

Using the PODS plugin. I need to add nested shortcode support which normally would be in the wp-config.php, but wordpress does not allow editing the core WordPress files.

The change is:

define('PODS_SHORTCODE_ALLOW_SUB_SHORTCODES', true);

Is there an alternate way of defining this and achieving similar functionality?

Share Improve this question asked Jun 15, 2019 at 17:52 Mike CroweMike Crowe 1112 bronze badges 4
  • Don't understand. The wp-config.php file can be modified by the end user. Any WP updates will not affect that file. There is an area that you can use for your own DEFINEs in there. – Rick Hellewell Commented Jun 15, 2019 at 18:03
  • 1 "wordpress does not allow editing the core WordPress files" – Mike Crowe Commented Jun 16, 2019 at 0:31
  • Oops. Missed that part. Thanks. The answer below might work, though. Although I am not a wordpress user - I host my own sites. – Rick Hellewell Commented Jun 16, 2019 at 1:26
  • afaik, "wordpress also does not allow using plugins" – is your site selfhosted using WordPress or hosted by WordPress? – Michael Commented Jun 17, 2019 at 0:29
Add a comment  | 

1 Answer 1

Reset to default 1

OK, for those who need, you can do the following:

  • Install Code Snippets
  • In a code snippet:

    add_filter( 'init', function( ) { define('PODS_SHORTCODE_ALLOW_SUB_SHORTCODES', true); });

That will define it without modifying wp-config.php

发布评论

评论列表(0)

  1. 暂无评论