Posts: 2
Threads: 0
Joined: Feb 2017
Hi,
I have NM set up and working fine. I would like to add an image as a header on the page used to show the posts but can't figure out how to do this. Obviously the function that gets the content is returning just the posts and ignoring any static text or images on the news page. Is there any way I can achieve what I'm trying to do?
Thanks,
Paul.
Posts: 3,491
Threads: 106
Joined: Mar 2010
If you want to always display the newspage content before the list of posts or single post, insert this in your template, before the <?php get_page_content(); ?> line:
Code: <?php if (nm_is_site()) getPageContent(return_page_slug()); ?>
Posts: 2
Threads: 0
Joined: Feb 2017
Fantastic - thanks. Worked like a charm.
Posts: 1
Threads: 0
Joined: Apr 2017
Carlos, Hi!
How to clone the plugin? I need 4 news feeds.
Thank you
Posts: 3,491
Threads: 106
Joined: Mar 2010
Here you have 3 clones:
http://www.cyberiada.org/cnb/news-manage...ger-clones
(They're still version 3.2.2, I have to update them...)
Note that this is just a (kludgey) workaround until I add multi-section support.
Posts: 39
Threads: 5
Joined: Oct 2013
2017-04-14, 20:51:23
(This post was last modified: 2017-04-14, 21:20:23 by carpman.)
Hi all,
I've got what is probably a really dumb question, but I just noticed something in my meta data that I wanted info on.
Using News Manager (updated) Version 3.3 -- I noticed in my pages:
<link rel="canonical" .... instructions that would, if I understand it correctly, be telling Google that a specific URL should be indexed as the canonical URL ??? Which in this case is the "news manager" blog's root:
For example I want Google to index this blog post:
http://scramblekit.uk/review/index.php?i...side-pouch
But the meta data for that post includes:
Code: <link rel="canonical" href="http://scramblekit.uk/review/index.php?id=outdoor" />
Doesn't this mean Google won't index the actual post URL, instead indexing:
http://scramblekit.uk/review/index.php?id=outdoor
I'm confused.
Also, is it the News Manager plugin that creates this entry or GetSimple. Since it's not in my template.
Sorry for such a dumb question, I should know this really.
Any help much appreciated!
C.
Posts: 39
Threads: 5
Joined: Oct 2013
2017-04-14, 21:50:37
(This post was last modified: 2017-04-14, 21:51:38 by carpman.)
Just in case anyone else has a similar issue and like me, didn't RTFM (actually I did way back, but changed my theme and didn't re-readTFM):
Recommended: Change your template's
Code: <?php get_header(); ?>
to:
Code: <?php get_header(false); ?>
- This way your site won't have the canonical meta tag (or else, because of the way GetSimole works, all posts have the same canonical URL, that of the news page).
-------------
Oooops -- sorry!
C.
Posts: 3,491
Threads: 106
Joined: Mar 2010
That's the easiest way, but if you prefer to have canonical urls in your site that work with NM posts, you can do this:
http://get-simple.info/forums/showthread...5#pid54725
or this:
http://get-simple.info/forums/showthread...5#pid54785
Posts: 39
Threads: 5
Joined: Oct 2013
2017-04-15, 01:30:05
(This post was last modified: 2017-04-15, 01:54:18 by carpman.
Edit Reason: Clarification
)
Hi Carlos
Thanks, that's useful. Forgive me as I'm a little tired, but I think in my case that's not necessary. The way I'm using News Manager is as a filter, so I'm using 2 different template files:
The output / results page (based on tags) is the News Manager root, and it uses:
Code: <?php get_header(); ?>
Then you click on one of the "results" (i.e. "read more ..." link to post) and that takes you to the post which uses a different template which has:
Code: <?php get_header(false); ?>
To see what I mean, go here:
http://scramblekit.uk/review/
Clicking on the Baselayer Square, gives you:
http://scramblekit.uk/review/?id=outdoor&tag=base
A list of tagged posts (with read more ...), then you click on the option you're after, e.g. "Best Cold Weather Baselayer" which would take you here:
http://scramblekit.uk/review/index.php?i...yer-ls-top
I'm trying to get my head round how Google deals with this. Have I got this right for my use case? So the "results output" preview post (tag output) list is canonical and the actual full post unique URL (is not canonical).
That code will be useful for my other sites, but perhaps not this one?
Thanks again for the quick reply and for the code. Any clarification would put this to bed, and me too, then I can enjoy the weekend.
C.
EDIT: My light-headed understanding, is that I'm pretty much mimicking the code options you gave above by using 2 templates One for single posts and the other for the News Page.
Posts: 39
Threads: 5
Joined: Oct 2013
A separate issue I've just bumped into regarding the RSS part of News Manager:
Here's my feed:
http://scramblekit.uk/review/index.php?id=rss
If you click on the first or any links, the & has been turned into & breaking the URL, so:
Code: http://scramblekit.uk/review/index.php?id=outdoor&post=rab-vertex-pants-lightweight-softshell-trousers
becomes the broken:
Code: http://scramblekit.uk/review/index.php?id=outdoor&post=rab-vertex-pants-lightweight-softshell-trousers
Anyone else have the same issue and if so, is there a way to fix it. Tried Google and forum search, but not too helpful.
Again, any help greatly appreciated.
C.
Posts: 3,491
Threads: 106
Joined: Mar 2010
(2017-04-15, 03:08:45)carpman Wrote: A separate issue I've just bumped into regarding the RSS part of News Manager:
[...]
If you click on the first or any links, the & has been turned into & breaking the URL, so:
[...]
This happens with NM 2.2.5 or later with default non-fancy URLs, because of a change I made to fix a different issue (#8). :-(
To fix this, edit news_manager_rss.php, find line 161 and change:
Code: $url = htmlspecialchars(nm_get_url('post') . $slug, ENT_QUOTES, 'UTF-8');
to:
Code: $url = nm_get_url('post') . $slug;
Posts: 39
Threads: 5
Joined: Oct 2013
Excellent, thanks, Carlos.
Any thoughts on my previous post, just looking for confirmation that I've got my head around this canonical thing in regard to Google SEO.
Thanks again, you're a star!
C.
Posts: 3,491
Threads: 106
Joined: Mar 2010
I think that the function in the second link I posted would work for you - you'd have proper canonical urls in your single-post and single-tag news pages. But anyway, you can try and check the generated source code to see if you get what you need.
Posts: 39
Threads: 5
Joined: Oct 2013
Thanks. Yes, I'd checked the source and it all looked fine, in addition since I'm using 2 different templates anyway for individual posts and the news manager main pages I'll stick with what I've got for now. Google just indexed a single post with the proper URL, so all looks good.
I've bookmarked that code, for future use.
Thanks again for all your help.
C.
Posts: 3,491
Threads: 106
Joined: Mar 2010
News Manager 3.3 onwards has issues with the Multi-User plugin 1.8.2 (the one available in Extend).
See here: http://get-simple.info/forums/showthread...9#pid60009
(can edit existing users permissions, but cannot add new users if NM enabled)
Posts: 3,491
Threads: 106
Joined: Mar 2010
I'm probably going to fix the Multi-User issue (see previous post) in News Manager this way:
- custom permission "News Manager Settings" will be removed.
- users that have access to Theme or Plugins management pages will have access to NM Settings.
I suppose that this solution will be fine for most sites using MU 1.8.x and NM 3.3+
Opinions and suggestions welcome.
Posts: 59
Threads: 6
Joined: May 2015
Thank you for such a fabulous plug-in. I love using it. The individual posts have a "back" link to previous posts. How do I add a link to "next" when there are more posts after it?
Posts: 3,491
Threads: 106
Joined: Mar 2010
(2017-04-29, 17:18:39)joyofweaving.com Wrote: Thank you for such a fabulous plug-in. I love using it. The individual posts have a "back" link to previous posts. How do I add a link to "next" when there are more posts after it?
I'll eventually add the previous/next posts feature - it's still in the to-do list ( #6)
In the meantime you can use this snippet:
PHP Code: <?php if (nm_is_single()) { $posts = nm_get_posts(); $current = nm_post_slug(false); $count = 0; foreach ($posts as $post) { if ($post->slug == $current) break; $count++; } $next = $count >= 1 ? $posts[$count-1] : false; $prev = $count < count($posts) ? $posts[$count+1] : false; ?> <div class="nm_prev_next"> <?php if ($prev) { ?> <div class="nm_previous_post"><a href="<?php echo nm_get_url('post'),$prev->slug; ?>" title="<?php echo $prev->title; ?>">Previous post</a></div> <?php } ?> <?php if ($next) { ?> <div class="nm_next_post"><a href="<?php echo nm_get_url('post'),$next->slug; ?>" title="<?php echo $next->title; ?>">Next post</a></div> <?php } ?> </div> <?php } ?>
You can paste it in your template, or create a component (e.g. nm-prev-next) and then enable NM Custom Settings and enter this:
Code: single componentBottomPost nm-prev-next
(or use componentAfterPost instead if you want to have the links under the "go back" link)
You can style the links using classes .nm_previous_post, .nm_text_post, etc. (or if you use a Bootstrap-based template you may prefer to change all those <div>'s to <ul class="pager"> and <li>'s)
Posts: 18
Threads: 3
Joined: Oct 2015
(2017-04-27, 02:39:13)Carlos Wrote: I'm probably going to fix the Multi-User issue (see previous post) in News Manager .... Thank you! Warmly waiting for this process ...
Maybe:
- can add photo/avatar and displaying bio
- filter news by author, so the index can be sourced from the tag
Posts: 324
Threads: 5
Joined: May 2012
(2017-04-27, 02:39:13)Carlos Wrote: I'm probably going to fix the Multi-User issue (see previous post) in News Manager this way:
- custom permission "News Manager Settings" will be removed.
- users that have access to Theme or Plugins management pages will have access to NM Settings.
I suppose that this solution will be fine for most sites using MU 1.8.x and NM 3.3+
Opinions and suggestions welcome.
This sounds like a good solution, how long until it becomes available?
Posts: 155
Threads: 10
Joined: Jul 2012
I dont remember if i asket this before, but is there a snippet to show current news related posts?.
Like if i have news which has tag moped and when i click that news to read the full post i can show related news in sidebar.
Posts: 3,491
Threads: 106
Joined: Mar 2010
Posts: 87
Threads: 1
Joined: Nov 2012
Hi Carlos, I've searched all of the forums but haven't found a definitive answer... Is there any way to integrate the Custom Title plugin ( Custom Title) with News Manager? I don't want to use the Post Title as the Page Title, I would like to have a completely unique page title for post just like I do with every other page in my site. Currently, the Custom Title field doesn't display inside the post options when editing/creating a post. Any help you can offer would be most appreciated.
Posts: 259
Threads: 38
Joined: Jun 2014
Hello,
is there a way to make custom headlines (h1 in my case) for tag pages instead of the standard blog page headline? I would like to have "Topic: Tag" instead of "Blog" as a headline on tag pages. The page title is individual, so perhaps there is a solution for headlines, too?
Thank you
Hypertexter
Posts: 3,491
Threads: 106
Joined: Mar 2010
(2017-06-23, 17:45:41)Hypertexter Wrote: is there a way to make custom headlines (h1 in my case) for tag pages instead of the standard blog page headline? I would like to have "Topic: Tag" instead of "Blog" as a headline on tag pages. The page title is individual, so perhaps there is a solution for headlines, too?
Since NM 3.1 you can use function nm_single_tag_title($prefix, $suffix, $echo) , e.g.:
Code: <?php nm_single_tag_title('Tag: '); ?>
In your case you may replace <?php get_page_title(); ?> by:
Code: <?php nm_single_tag_title('Topic: ') or get_page_title(); ?>
|