Forum

Thread tagged as: Problem, Blog

Perch Blog - Call in posts from either section

I want to call in Blog posts into my page if they are tagged either 'General' or 'Commercial'. I tried the following:

<?php
  perch_blog_custom(array(
  'sort' => 'postDateTime',
  'sort-order' => 'DESC',
  'section'=> array('commercial', 'general'),
  'count' => 10,
  'template' => 'post_in_list.html'
  ));
?>

But it messes up and displays the following on my blog:

Warning: PDO::quote() expects parameter 1 to be string, array given in /home/kubiak/public_html/helm/access/core/lib/PerchDB_MySQL.class.php on line 376

James Tedder

James Tedder 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That's not possible. You can display posts from one section or from all sections.

Is there a chance it could be made possible in future. I have 3 separate blogs (sections) on a website I am building, but sometimes a post may be relevant to all 3.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Posts belong to one section only.

What you're doing sound more like categories.

The Sections share Categories too.

So a Commercial Post, may have the category "Just completed" and so may a Residential post have the same "Just Completed" Category.

Its a website for a company with three different divisions who's news stories sometimes crossover.

I am now working on another where calling posts from multiple 'sections' would be useful. Is this something that is possible to add to a Blog update?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's possible to add, but it's not planned.

It would be greatly appreciated, if it could be added.