开发者 |
sorich87
saymar90 justinahinon |
---|---|
更新时间 | 2019年6月27日 06:07 |
PHP版本: | 5.6 及以上 |
WordPress版本: | 5.2 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
Click on the \'Loops\' link in the \'Appearance\' menu, click \'Add New\' to add a new loop. Use the shortcode provided or go to the widgets screen to add the loop to a sidebar.
Copy a default template file from the directory \'tl-templates\' in the plugin directory to your theme directory. Then feel free to modify it to your liking! Copy a default template file from the directory \'tl-templates\' in the plugin directory to your theme directory. Then feel free to modify it to your liking! The template\'s header must contain the line: * The Loops Template: List of excerpts
Use a function hooked on filter \"tl_templates_directories\" eg. add_filter(\'tl_templates_directories\',my_plugin_tl_templates_directory); function my_plugin_tl_templates_directory($directories){ $directories[]=MYPLUGIN_ABSOLUTE_DIR; //change this to the absolute directory you want to be checked for templates return $directories; } The Loops will then check in MYPLUGIN_ABSOLUTE_DIR if there is valid templates which it can use; and they will be available through The Loops options.