MortenPeterAndersen
Forum Replies Created
-
Forum: Plugins
In reply to: [Simple News] Automatic information from URLhmm sorry but I’m not quite certain what you mean?
Forum: Plugins
In reply to: [Simple News] Display category nameI think this should work.
Change line 28 to this instead:$categories = get_the_category(); $separator = ', '; $output = ''; if ( ! empty( $categories ) ) { foreach( $categories as $category ) { $output .= esc_html( $category->name ) . $separator; } echo '<div class="simple-news-date">' . get_the_date() . ' - ' . '<span class="simple-news-categories">' . trim( $output, $separator ) . '</span></div>'; }
I think your idea with displaying the category name is something I will implement in the next update – thanks ??
Morten
Forum: Plugins
In reply to: [Simple News] Display category nameHi klfrnds
If you have the courage, try changing the line 28 in the functions.php (folder = files)
from:
echo '<div class="simple-news-date">' . get_the_date() . '</div>';
to:
echo '<div class="simple-news-date">' . get_the_date() . ' - ' . '<span class="simple-news-categories" >' . get_the_category_list( ', ' ) . '</span></div>';
Please let me know if it helps
??
MortenForum: Plugins
In reply to: [Simple News] Display category nameAn easy way is to divide all the news like this:
<h3>Cat name 1</h3> [news cat=1] <h3>Cat name 2</h3> [news cat=2] <h3>Cat name 3</h3> [news cat=3]
… but you want the cat name inside the news … am I right?
If that’s the case, then I have to change the coding in the plugin.??
MortenForum: Plugins
In reply to: [Simple News] Adding TagsPlease explain … I’m not sure what you are thinking about?
Forum: Plugins
In reply to: [Simple News] Limit news Displayed??
Forum: Plugins
In reply to: [Simple News] 2 x news plugins?If you do not have an ftp program, I recommend FileZilla
https://filezilla-project.org/But I sense that you don’t know that much about programming, perhaps this is not the right way for you and your website.
I really don’t think you need two differents news plugin …. think you are going in the wrong direction …. One news plugin and then use categories to differ between what you need.
??
MortenForum: Plugins
In reply to: [Simple News] 2 x news plugins?Strange
Then undo your coding, and try the fix but now with ftpForum: Plugins
In reply to: [Simple News] 2 x news plugins?sorry
'labels' => array('name' => __('News XXX', 'simple-news')
‘labels’ => array(‘name’ => __(‘News Case Studies’, ‘simple-news’),
Forum: Plugins
In reply to: [Simple News] 2 x news plugins?Try to rename the menuitem
In the file news.php on line number 24 – rename ‘News’ to something else'labels' => array('name' => __('News', 'simple-news'),
to
'labels' => array('name' => __('News' XXX, 'simple-news'),
Are you now able to see both plugins menuitems ?
??
MortenForum: Plugins
In reply to: [Simple News] 2 x news plugins?Do you mean the same plugin two times?
If so – it’s not possible“… installed Simply New but it isnt showing on my menu bar.”
You mean the admin menu bar?You can use two shortcodes. One for “sector” and one for “service”
example
[news cat=1]
and[news cat=2]
cat = 1 => sector
cat = 2 => serviceForum: Plugins
In reply to: [Simple News] Category view broken after update to version 2.1cool – I will update the plugin now ….deleting this lines.
Thank you for your help??
MortenForum: Plugins
In reply to: [Simple News] Category view broken after update to version 2.1Hi mik9
I think I know whats wrong.
If you could help me testing it I would really appreciate.In the file news.php delete the last lines (85 – 94)
// Show news items in archive function simple_news_show_in_archives( $query ) { if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { $query->set( 'post_type', array( 'post', 'nav_menu_item', 'news' )); return $query; } } add_filter( 'pre_get_posts', 'simple_news_show_in_archives' );
Forum: Plugins
In reply to: [Simple News] Short code for display only news titleHey techgig101
The shortcode only printing the 2 latest news is:
[news number=2]
… and then you have to hide elements using css
.simple-news-img-con, .simple-news-date, .simple-news-excerpt {display: none;}
Hope that makes sense
??
MortenForum: Plugins
In reply to: [Simple News] Space Between Excerpts in WidgetGlad I could help ??