amandablum / mindup

1 stars 0 forks source link

Archive Template Pagination Issues #97

Closed vitamincee closed 8 years ago

vitamincee commented 8 years ago

There are two templates, one for just news and one for everything but news.

I set it up so that the news archive uses category-news.php, and the all-but-news uses index.php with a query_posts('cat=-1'); to exclude the news category.

The problem is now the custom pagination doesn't work on the index.php for some reason, perhaps because it's the blog index template and not an archive template. I'm also not entirely sure if this is the best way to handle showing all categories together but one.

amandablum commented 8 years ago

Worthwhile to note, I'd prefer to have archives for each cat as well. the repo (the all-but-news) can stand alone. Its in addition to, rather than in place of cat archives

On Tue, Apr 5, 2016 at 10:50 AM, cee notifications@github.com wrote:

There are two templates, one for just news and one for everything but news.

I set it up so that the news archive uses category-news.php, and the all-but-news uses index.php with a query_posts('cat=-1'); to exclude the news category.

The problem is now the custom pagination doesn't work on the index.php for some reason, perhaps because it's the blog index template and not an archive template. I'm also not entirely sure if this is the best way to handle showing all categories together but one.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/amandablum/mindup/issues/97

chuckreynolds commented 8 years ago

So which ... so how you normally remove a cat from the main query is by filtering pre_get_posts. Now... the question is... what's supposed to be on the main page of the site or main blog? Essentially wherever it needs to be removed from we'd do a pre_get_posts if is_home or is_front_page sort of thing. Right now it doesn't look like the main index page is set to do anything at http://dev1.dapperdigital.net

What's the URL for the main 'blog' w/o the news cat? and is that set in general settings as the blog page or?

Also each category, by default, will have its own archive link out of the box.

lmk thx

amandablum commented 8 years ago

What we need:

repo (all cats except news) News Archive Archives for all other cats that look just like News.

what we have now: repo: http://dev1.dapperdigital.net/get-mindup/ news archive: http://dev1.dapperdigital.net/category/news/ Archives for all other cats: http://dev1.dapperdigital.net/category/webinars/ http://dev1.dapperdigital.net/category/white-papers http://dev1.dapperdigital.net/category/videos (which work but do not behave like news, which they should)

chuckreynolds commented 8 years ago

well all the other cat archives are falling back to using archive.php with is including /template-parts/content.php. You can either create a /template-parts/content-post.php for all types = post or fix the archive.php file to do what you made category-news look like.

amandablum commented 8 years ago

k. got it. we can just take the archive code and make that into a template, set up a page and set that template and that becomes the repo. Then we would literally rename category-news.php to archive.php and be set there, right? .

On Tue, Apr 5, 2016 at 7:18 PM, Chuck Reynolds notifications@github.com wrote:

well all the other cat archives are falling back to using archive.php with is including /template-parts/content.php. You can either create a /template-parts/content-post.php for all types = post or fix the archive.php file to do what you made category-news look like.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/amandablum/mindup/issues/97#issuecomment-206083058

chuckreynolds commented 8 years ago

Shouldn't need to make a page template. If all archives are supposed to look like how category-news.php is now then remove that file and make archive.php use that code. I mean unless I'm missing something huge here this is how the WP template heirachy works. Index.php will the blog and front-page.php will be that. Mobile excuse non code breakouts

On Tuesday, April 5, 2016, Amanda Blum notifications@github.com wrote:

k. got it. we can just take the archive code and make that into a template, set up a page and set that template and that becomes the repo. Then we would literally rename category-news.php to archive.php and be set there, right? .

On Tue, Apr 5, 2016 at 7:18 PM, Chuck Reynolds <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

well all the other cat archives are falling back to using archive.php with is including /template-parts/content.php. You can either create a /template-parts/content-post.php for all types = post or fix the archive.php file to do what you made category-news look like.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/amandablum/mindup/issues/97#issuecomment-206083058

— You are receiving this because you were assigned. Reply to this email directly or view it on GitHub https://github.com/amandablum/mindup/issues/97#issuecomment-206086256


@ChuckReynolds | Vuurr http://vuurr.com http://linkedin.com/in/chuckreynolds

vitamincee commented 8 years ago

okay i got rid of category-news.php and moved it over to archive.php. i made a page template for the repo - tpl-repo.php, which also doesn't work with pagination.

i'm using the basic example here: https://codex.wordpress.org/Function_Reference/paginate_links which appears to only work with search results/archives.