I’m looking to insert a foreign div-element only once in a archive query on my page. So that for example: Post1 Post2 [Static Div] Post4 Post5 …etc My query is: <?php $archive_args = array( post_type => ‘post’, ‘category_name’ => ‘category’, ‘posts_per_page’=> -1, ‘meta_key’ => ‘number’, ‘order’ => ‘ASC’ ); $archive_query = new WP_Query( $archive_args );?> […]
I need to display custom posts archives on a page in the following format: Monthly – Grouped by Month for the Current Year. Annually – Grouped by Year & Month for all previous years So I have got two functions to do so, which supposed to be called in a row: function show_monthly_archive( $post_type ) […]
What would be the best way to go about creating something like this (https://www.fiawtcc.com/calendar/) in WordPress? This is a calendar, with posts (containing the event date and event description), separated by year. A thought doing something like this, but I do not know, if this is a good solution, or if it is possible: Creating […]
When a user visits a post type archive page on my site, I’ve got a bunch of hooks and filters that run on that query and get it just so. How can I, in a different request, say “I want the query that would run when I go to /archives” so I can get those […]
I’d like to display daily archives differently than monthly/yearly archives. How do I check to see if the archive template is being pulled for a daily archive vs. a monthly/yearly archive?
I recently adjusted the twentyten theme to display archives in a three column grid. In doing so, it seems that the archive has lost the ability to display posts from the specified taxonomy. For instance, a taxonomy type is ‘Flowers’, with a specific flower being ‘Rose’. When the ‘Rose’ archive is displayed, it simply lists […]
Dumb Questions Ahead: If index.php and archive.php are practically the same thing, what’s the point of having archive.php? When should I ever want to use archive.php over index.php? If I use front-page and Blog, it doesn’t switch to archive.php which you might expect to and then use index.php in the place of front-page.php.
I have a basic archives.php file. I was trying to get it to display only posts from category 1. When I do query_posts(‘cat=1’), the URL is then ignored and all posts in category 1 are displayed. For example, lets say I have one post in category 1: it’s called “testing post” and is dated November, […]
Question What’d be an optimal way to redirect the home page of a WordPress site to a category archive without involving external factors (e.g. Apache’s .htaccess) i.e. within WordPress? Why? (Only to justify the question. Please let this not turn the question into too localized.) It’s a news site. The categories are used as Editions, […]
I have CPT ‘movie’, with the following taxonomies: genre, director, and actor. The code used to register these is this: http://pastebin.com/yJ9XHCDk I have an archive movie page working using the following code in archie-movie.php: <?php get_header(); ?> <div id=”middle” class=”clearfix”> <div id=”inner”> <div id=”content” class=”<?php echo $bw; ?>”> <?php get_template_part( ‘part-genrenav’); ?> <div id=”pageHead”> <?php […]