Thread Rating:
  • 4 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
(2019-03-12, 00:49:05)Carlos Wrote: (replying to http://get-simple.info/forums/showthread...5#pid63895 )
(2019-03-11, 22:47:15)acenda Wrote: News Manager updated (Great plugin, but little problems with post pictures and social media. Made it work, but picture should be invisible in posts and post list. Only visible in social media og:image)

Enable NM Custom Settings and enter:
Code:
showImages 0

Nice! Thanks mate Smile
Reply
Hi Carlos. How can I use the post picture in og:image? Is there a way to print picture's url?
Thanks! Smile
Reply
(2019-03-15, 23:28:23)acenda Wrote: Hi Carlos. How can I use the post picture in og:image? Is there a way to print picture's url?
Thanks! Smile

You can use nm_post_image_url() with optional parameters width, height, crop (see NM template tags (since 3.0))

Example (insert in your template's <head> section):
Code:
<?php if (nm_post_has_image()) { ?>
<meta property="og:image" content="<?php nm_post_image_url(640,480,1); ?>">
<?php } ?>
Reply
How about, or is there, funktion that one can select in post options which page to show each news?.
Like if i have news about football i can select from post options to show that football news in football page etc Big Grin.
Reply
(2019-03-16, 00:47:24)Carlos Wrote:
(2019-03-15, 23:28:23)acenda Wrote: Hi Carlos. How can I use the post picture in og:image? Is there a way to print picture's url?
Thanks! Smile

You can use nm_post_image_url() with optional parameters width, height, crop (see NM template tags (since 3.0))

Example (insert in your template's <head> section):
Code:
<?php if (nm_post_has_image()) { ?>
<meta property="og:image" content="<?php nm_post_image_url(640,480,1); ?>">
<?php } ?>

Ok, many thanks mate! Smile
Reply




Users browsing this thread: 3 Guest(s)