Problog Date Archive
Permalink Browser Info Environment
Is it possible when visiting a month in the date archive (see attached image)(marked green) to only display results that are posts and not the month archive and year archive subpages (marked red)?
Thanks for your time!
Thanks for your time!
Type: | Discussion |
---|---|
Status: | New |
great. let me know if you are successful.
also i just realized, that the results are not rendered in the same page-type as the rest of the blog and blogsearch. could not find out what page-type is used yet.
albert
also i just realized, that the results are not rendered in the same page-type as the rest of the blog and blogsearch. could not find out what page-type is used yet.
albert
hi chad,
any hints on how to turn off the month archive and year archive subpages in the date archive yet? would really appreciate it!
any hints on how to turn off the month archive and year archive subpages in the date archive yet? would really appreciate it!
You can go to those pages in the sitemap and add the "exclude from search index" property and exclude them from search results.
The reason they are not automatically set this way, is that they are "intended" to actually be pages with each month/year containing their own blog list of results for that month. In case a user would like to go back and review any entire months worth.
ChadStrat
The reason they are not automatically set this way, is that they are "intended" to actually be pages with each month/year containing their own blog list of results for that month. In case a user would like to go back and review any entire months worth.
ChadStrat
thank you very much, that already helped a lot!
I had this same problem but it's a mega hassle to keep adding the 'exclude from search index' attribute to every month and year so I hacked it to automatically assign that attribute when the year and month pages are created.
In packages/problog/helpers/blogify.php around line 50, after this:
add this:
And do the same for the month page, around line 130, after this line:
Add this:
Maybe there's a simple way to make children pages inherit attributes through the GUI but this works too.. hope this helps someone! = D
In packages/problog/helpers/blogify.php around line 50, after this:
$canonical_year = $parent->add($pageType, array('cName' => $year, 'cHandle' => $year,'cDescription'=>$year.t(' Blog Posts')));
add this:
$canonical_year->setAttribute('exclude_search_index', 1);
And do the same for the month page, around line 130, after this line:
$canonical_month = $canonical_year->add($pageType, array('cName' => $month, 'cHandle' => $month,'cDescription'=>$month_name.', '.$year.t(' Blog Posts')));
Add this:
$canonical_month->setAttribute('exclude_search_index', 1);
Maybe there's a simple way to make children pages inherit attributes through the GUI but this works too.. hope this helps someone! = D
This was updated/changed in v12 of ProBlog. All newly created date pages for canonical urls have exclude from pagelist and exclude from sitemap added automatically.
ChadStrat
ChadStrat
looking into this.
ChadStrat