开发者 | sumitbhagirath |
---|---|
更新时间 | 2020年6月11日 15:33 |
PHP版本: | 7.0 及以上 |
WordPress版本: | 5.4.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
Please make sure that Permalink link should not be "/news" Otherwise all your news will go to archive page. You can give it other name like "/ournews, /latestnews etc"**As this pluign is created with custom post type, you can now add Gutenberg editor support for the plugin for writing the news post. For that we have added apply_filters. For more details please check plugin FAQ section.
apply_filters( 'nwowls_news_registered_post_type_args', $news_args );
Now you can Display news post with the help of short code :
[news_slider ]
Display News with Grid:
[news_slider type="list"]
Display News with Slider:
[news_slider type="slider"]
Also you can Display the news post with Multiple categories wise
Demo news :
[news_slider category="category_id"]
Test news
[news_slider category="category_id"]
Setting for slider and news list
Comments for the news
Template code :
<?php echo do_shortcode('[news_slider]'); ?>
Following are News Parameters:
[news_slider]
or [news_slider type="list"]
and Slider [news_slider type="slider"]
Sports news [news_slider category="category_id"]
[news_slider]
.Just add this code in your theme function.php file to enable/disable Gutenberg editor support for News Posts :
function prefix_gutenberg_editor_support($news_args){
$news_args['show_in_rest'] = false;
return $news_args;
}
add_filter( 'nwowls_news_registered_post_type_args', 'prefix_gutenberg_editor_support' );
No, not usually. But if you are geting "/news" page OR 404 error on single news then please update your permalinks to Custom Structure.
If you are getting this error, please go to Setting --> Permalinks and under Permalinks Setting select "Plain" radio button and save. Now again go to "Post name" radio button and save again. This will fix your issue.
Yse [news_slider]