The tag has no wiki summary.

learn more… | top users | synonyms (1)

14
votes
4answers
3k views

Show a different number of posts per page depending on context (e.g., homepage, search, archive)

In the Reading Settings, there is place to set the number of posts shown that affects the number of posts shown in all contexts. I'd like to show instead a certain number of posts on the homepage, and ...
9
votes
4answers
11k views

Default archive URL wordpress

In wordpress you have a few 'default' archive URL's. Like for example: http://www.mydomain.com/2011/ generates an overview of the posts of (only) that year. If you have an category blogs the url ...
7
votes
2answers
337 views

Get rid of Wordpress category, tag and author archives?

I have searched the net with no success on what should be an easy thing. I have a highly customized blog with pages, sub pages and posts. While I rely heavily on the use of categories and tags I ...
7
votes
3answers
636 views

Order posts (across the whole site) by metadata date

My custom 'Home' page is set to sort my custom posts via the custom date field with this (updated to be custom named) code in functions.php: // sort order for home page add_action('wp', ...
7
votes
2answers
441 views

Permalink Structure for Multiple Post Type Archives by Taxonomy

Recently I have been working on an advanced WordPress project, and I'm stuck with changing permalink structure for custom post types. I have created 3 post types lets say: type1, type2, type3 and a ...
6
votes
2answers
508 views

How can I lock down an old wordpress install I don't intend to update?

I am starting a new wordpress blog, and no longer updating an old one. The old one still gets 400-500 hits a day, so I would like to keep it up for archival purposes, as people still link to its ...
5
votes
3answers
1k views

Decreasing the Memory Consumption of a WordPress Site?

The test site requires a lot of memory when viewing some category/archive pages. I met with the following error messages yesterday: Fatal error: Allowed memory size of 33554432 bytes exhausted ...
5
votes
2answers
7k views

get_categories for custom post type with a specific custom taxonomy attached

Basically I have a custom post type of 'products' which has two taxonomies attached to it...the normal 'category' and a custom taxonomy called 'brands'. I have a page which is 'brand' specific. On ...
5
votes
1answer
1k views

Setting up custom post type archives in WP3.1? Any luck?

I've just moved a site I'm developing to WP3.1 so that I can take advantage of and start testing some of the new features. I'm especially liking the has_archive parameter in registering custom post ...
5
votes
1answer
490 views

WordPress Posts By Date/Day?

I want to output on the homepage the posts from the lastest 3 days. Like this: 30/03/12 post 1 post 2 post 3 29/03/12 post 1 post 2 post 3 28/03/12 ...
5
votes
1answer
3k views

How to display the status of users (online - offline) in archive.php

I am using the code the user status How to check if a user (not current user) is logged in?. On page profile of the author it works well (thank you guys). But if I put on the archive page, at the ...
5
votes
2answers
430 views

Archive permalinks

This site has been very helpful for me in learning how to rewrite permalinks using add_filters to solve issues we were having when we merged two blogs into one. But, I do have one item I have been ...
4
votes
3answers
5k views

Custom Post Type Archives by Date and Taxonomy

Lets use the classic example of a custom post type called "movies", with its own taxonomy called "genre". By registering the custom post type (with a "movie" slug), the permalinks are already set up ...
4
votes
2answers
5k views

Custom Post Type Archive Page: Set Posts Per Page, Paginate

I have a custom post type called video. Would like to paginate its archive page, showing only 3 posts on each page. There is also a custom loop on the archive page that outputs all the video posts ...
4
votes
3answers
11k views

What is the link to my default “archive” page?

I'm using twentyten and have overloaded home.php to do some custom stuff. However, I would still like to have a page that lists all of my recent posts, archive-style. I can get to an archive page for ...
4
votes
2answers
686 views

Display Editable Text Above CPT Archive Listings

I have two custom post types (Authors and Partners). I display their archive page's in the main navigation and use archive-authors.php and archive-partners.php to make a couple small tweaks to the ...
4
votes
1answer
788 views

has_archive=false on the default post type

On the default post type, why does the has_archive property equals to FALSE? $type_obj = get_post_type_object('post'); var_dump($type_obj->has_archive); // FALSE
4
votes
2answers
4k views

What's the URL for a category archive?

If my category URL is: /blogs/category/foo and my archive URL is: /blogs/2011/02/ what's the URL for 'foo' blogs from February 2011?
4
votes
1answer
518 views

How to Add jQuery Infinite Scroll to My Custom Archive Page

I currently have a custom archive page that displays my current post at the top and then links to all of my older posts below that. However, I need to break up the page so that it displays the ...
4
votes
1answer
114 views

Multiple Paginations on one Page

I have a page template which aggregates multiple CPT's in different areas of the page and displays the first post from each CPT. I'd like to add a separate pagination for each of them. Is it possible ...
4
votes
2answers
2k views

How can I get posts in a subcategory to display on it's parent categories archive page?

Currently when you display an archive category page, it only displays it for the main parent, and doesn't display any of the posts that may be in the subcategories under it's parent. How can I alter ...
4
votes
1answer
1k views

Custom Post Type Archives by Date with Custom Permalink

I'm a bit stuck with getting the custom permalink for custom post type (CPT) archive to work. I've registered my 'press_release' CPT as following: add_action('init', 'press_release_post_type_init'); ...
3
votes
2answers
5k views

WP 3.1 - archive pages for custom content types possible now without a plugin?

I noticed that WP 3.1 supposedly has 'new CMS capabilities like archive pages for custom content types', however, I can't see that implemented yet? I've been using a plugin called 'Simple Custom Post ...
3
votes
3answers
91 views

How do I place content on archive pages but not on main page?

I would like to place content in a sidebar of my blog articles when they are viewed in the archive, but not show this content when the blog articles are shown on the main page of my site. Can this ...
3
votes
3answers
2k views

Archive Listings Filtered by Date Values in a Custom Field/Post Meta?

(Moderator's Note: The original title was "using archive by date with a custom date") I'm adding an additional date to posts as a custom field. Now I want the archive to show posts by the custom date ...
3
votes
1answer
1k views

Custom post types - Use post_id in permalink structure when using has_archive => true

I recently asked this question Custom post types - Use post_id in permalink structure and solved it but as I have enabled 'has_archive' => true the solution given no longer works. Let me explain: ...
3
votes
2answers
1k views

How do I make wp_get_archives show me months where only pages were created?

I am creating a plugin and have a problem, this code gives my all months that post were added: <select name="sdate" id="sdate"> <?php wp_get_archives('format=option'); ?> ...
3
votes
4answers
2k views

Only get_posts of certain post formats

I'm trying to create a archive list with only my "normal" post format articles (not link, aside, quote, etc formats). How would I implement has_post_format( 'standard' ), or something similar, into ...
3
votes
2answers
110 views

Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?

I am building a theme in which I have a post type, which will have an archive in a grid layout. You're probably thinking, "Just use the CPT archive!" Well, there are some cons to that method that I'd ...
3
votes
2answers
2k views

Archive by Year

After some searching I haven't been able to find a answer to what I'm trying to archive. I'm trying to set up an archive page with accordion panels that hide/show posts from a given year with links. ...
3
votes
2answers
4k views

Display list of Sub-Categories and the posts they contain, within one main Category

I've found tons of code and plugins to do various things; from show posts for specific cats, subcats of a cat, etc.. BUT, I cannot for the life of me find, nor do I know the WP API well enough to do ...
3
votes
1answer
2k views

Archive list with only years and months

I'm trying to show the archive list like that <ul> <li>Year</li> <li>Month</li> <li>Month</li> <li>Month</li> <li>Year</li> ...
3
votes
2answers
2k views

Archive sorting functions by custom fields (front-end)

I want to give the users the ability to sort the posts in the archive by some custom fields that I pre-define. The end result would be en a tabbed container, and the user will click on the relevant ...
3
votes
2answers
833 views

Adding content to archive and taxonomy pages on custom post types?

I have a custom post type named "Products" and a taxonomy called "Usage". On my "Products" landing page I'd like to have custom content that can be edited via WYSIWYG by the client. Same goes for the ...
3
votes
1answer
653 views

Neither the_excerpt() nor the_content() works properly?

I'm wondering what should be used in index.php (post listing page): the_excerpt() or the_content()? Twenty Thirteen uses the_content() but this prints entire content unless <!--more--> exists ...
3
votes
2answers
130 views

Retaining old HTML archives and displaying themes conditionally

I am converting a website from straight html (with tables! Ugh!) to WordPress. The company has a new design every year, and but keeps an archive of their old site(s) with the old design(s) on their ...
3
votes
1answer
702 views

Custom Post Type Archives with 0 Posts Redirects as 404

I'm working with the new custom post type archives in 3.1 and I noticed that when my post type has 0 posts, the archive for the type results in a 404. Looking at the order of hooks being processed, ...
3
votes
1answer
454 views

Custom Post Type Archives by Date (stored as meta value) WP3.1

I would like to implement date-based archive functionality (similar to original WP Archives widget functionality) for custom post type (CPT). What makes it difficult is the fact that I need to group ...
3
votes
2answers
568 views

Create permalink structure for one taxonomy archive per custom post type

So, I've been going crazy trying to figure this out. Essentially, I've created two custom post types, 'the_case_study' and 'the_video', with respective slugs 'case-studies' and 'videos'. I've also ...
2
votes
1answer
4k views

Are Custom Taxonomy Templates Possible?

I am trying to have some information specific to a taxonomy term appear above that taxonomy's archive list. Example: Taxonomy is 'Sports', with football, soccer, and baseball being terms within the ...
2
votes
2answers
2k views

Include and Exclude Taxonomies From Archives & Feeds Using 'pre_get_posts'

What I am trying to do? My blog uses a custom taxonomy called edition with terms like us-canada (6), eu (7) and india (8) -- term slug (ID). I want to make sure that posts not assigned to any ...
2
votes
3answers
6k views

Custom post type pagination 404 fix?

Been trying to get this working all day but haven't had any luck... I have a custom post type called 'news' and an archive template (archive-news.php), here I'd like to show 2 posts with pagination, ...
2
votes
2answers
3k views

Clear cache when a post is submitted [closed]

I have a question. How can I clear the cache when a post is submitted ? Actually, I need to clear two speficied pages which display these articles ? By default, I have noticed the index.php is ...
2
votes
1answer
2k views

Including post_type = 'wiki' in author archives

For a user with wiki-update permission only, I want to list their wiki articles in the author archive page. Currently, it comes back with "NOT FOUND Apologies, but ...". I am using the Twenty-ten ...
2
votes
3answers
9k views

Create an “All Posts” or “Archives” Page with WordPress 3.0?

I'd like to create an "All Posts" page on the Ocean Bytes blog that contains an unordered list of all Titles of the posts to date, with each title hyperlinking to its blog post. There appear to be ...
2
votes
2answers
808 views

Post Format Archive template name for theme folder?

What should I call the archive file for a post format? Ex archive-gallery.php? (doesn't work) I would like to create a list of all the gallery formats with a preview and some custom taxonomies thrown ...
2
votes
5answers
1k views

if in_category on archive.php

So I'm trying to do an if / else statement on an archive.php template. I setting up my archives using WP Smart archives reloaded (http://wordpress.org/extend/plugins/smart-archives-reloaded/) The ...
2
votes
3answers
367 views

Must permalinks always point to single post pages?

Suppose that I have a blog with few posts per month, and no comments, and I don't want to show posts in single post pages, but always "in context" (say, together with the posts in its month - or ...
2
votes
1answer
1k views

How to limit wp_get_archives to show months for the X years only

Can anybody show me how to set a limit on wp_get_archives to show archives by month BUT only those for the year 2010 and above - so the 2009 monthly archives are not shown on the sidebar archive ...
2
votes
1answer
2k views

Archive widget - limit number of months to 12

The default Archive widget display monthly archives in a dropdown. I would like to limit the number of months to 12 (in dropdown). What filter I should apply in my functions.php? I tried this, but ...