Controlling # of posts displayed on category/tag/etc. archives

13 views
Skip to first unread message

Kai Pan

unread,
Apr 2, 2010, 4:49:27 PM4/2/10
to Carrington CMS Theme Framework for WordPress
Hey,

I just noticed that archive pages always show 25 posts per page and
don't change with the "Blow pages show at most:" setting in WordPress
under Reading Settings. The home page and subsequent pages DO
correspond to that setting but not the archive pages. I've tried
looking for some setting that stipulates 25 posts but I haven't yet
found anything. Is there a way to change the number of posts to be
displayed on archive pages to something OTHER than 25?

Thanks.

Kai Pan

unread,
Apr 2, 2010, 4:57:26 PM4/2/10
to Carrington CMS Theme Framework for WordPress
Nevermind! I'm using JAM and it just doesn't include the admin page to
control the number of posts per archive page. My bad. Guess I'll have
to figure out how to rejigger one.

Dan Cameron

unread,
Apr 3, 2010, 7:54:35 PM4/3/10
to Carrington CMS Theme Framework for WordPress
Kai,

The best way to 'fix' this issue is to remove the
cfct_posts_per_archive_page function.

Just add this to your functions.php file and you'll be good.

remove_action('pre_get_posts', 'cfct_posts_per_archive_page');

Unrelated but here's another action I remove:
remove_action('admin_menu', 'cfct_admin_menu');

Kai Pan

unread,
Apr 4, 2010, 12:02:36 AM4/4/10
to carrington...@googlegroups.com
Hey Dan,

I'm guessing that second one takes out the "Carrington" page from under "Appearance" right?

And the first one sets the archive pages to display # of posts according to whatever is in the default WordPress Readings settings, right?

Cheers!

Kai Pan

unread,
Apr 4, 2010, 12:07:44 AM4/4/10
to carrington...@googlegroups.com
Hm, just tried it and it doesn't seem to work. Do I add it to the parent folder's function.php or the one in the function/ folder?

Kai Pan

unread,
Apr 4, 2010, 12:11:50 AM4/4/10
to carrington...@googlegroups.com
Just tried adding those two lines to both files but the number of posts showing in the archives is still not based on what's set in WordPress.

I know I can edit the carrington ajax-load.php core file to change the number shown but this seems more like an unwise hack.

Dan

unread,
Apr 5, 2010, 11:34:00 AM4/5/10
to Carrington CMS Theme Framework for WordPress
Make sure remove_action('pre_get_posts',
'cfct_posts_per_archive_page'); is at the end of the main
functions.php file.

Quan

unread,
Apr 6, 2010, 1:15:13 AM4/6/10
to Carrington CMS Theme Framework for WordPress
Hey I'm actually having trouble in this area you mentioned. My
homepage and other pages DON'T correspond with my "Blog pages show at
most:" setting. Despite the number I put in the setting, my homepage
only shows 5 posts + any Sticky posts. Did you have to change anything
in the carrington-blog.css to fix this?

Kai Pan

unread,
Apr 6, 2010, 1:20:56 AM4/6/10
to carrington...@googlegroups.com
I'm using Carrington JAM, not Blog, but I imagine Carrington Blog should have the appropriate admin page for you to control the number of posts displayed. Check under the Appearance menu or something. There should be a big page of options for you.



--
To unsubscribe, reply using "remove me" as the subject.

Quan

unread,
Apr 6, 2010, 1:42:36 AM4/6/10
to Carrington CMS Theme Framework for WordPress
Ah, my apologies, missed that you were using JAM. No luck for me,
nothing in the Appearance menu. I'll start a new thread, but thanks
anyway

On Apr 5, 10:20 pm, Kai Pan <kai....@gmail.com> wrote:
> I'm using Carrington JAM, not Blog, but I imagine Carrington Blog should
> have the appropriate admin page for you to control the number of posts
> displayed. Check under the Appearance menu or something. There should be a
> big page of options for you.
>

Kai Pan

unread,
Apr 6, 2010, 1:39:44 PM4/6/10
to carrington...@googlegroups.com
Dan, I moved those two lines to the end of the functions.php file in the parent folder (so not in the functions subfolder) but still didn't see anything change. I'm viewing the theme I'm developing via the preview theme function but I don't know if that might have anything to do with it since other functions seem to work just fine.
Reply all
Reply to author
Forward
0 new messages