Link to a weekday in WordPress - wordpress

I'm in need of a number of small graphics that link to specific weekdays (last Friday and Saturday).
However I'm struggling to find if there's a pre-built way of doing this. The codex don't seem to give anything away.
If it's not possible, I think a wp_query that targets posts may be needed.
If anyone has any ideas how you'd fetch items from a custom post type from a specific day of the week that would be amazing.
Thanks.

Create a querystring for your links that includes the day of the week. Check the codex pages on get_permalink and add_query_arg if you need them. Perhaps create a page template for the page you link to.
On your page, create a new instance of WP_Query and set the time parameters accordingly.
Post back with code if you still can't get it to work.

Related

Add last edited date to WordPress comments

Does anyone know a way to display the timestamp for when a WordPress comment was last edited? (For example, see comments on the Moz blog.) I've searched the Codex and Google, and can't seem to find anything... It doesn't appear to be available in the list on this page: http://codex.wordpress.org/Function_Reference/get_comment
Thanks!
Unfortunatelly, there are no built-in way to output the date of edit, because wordpress don't store this info in database.
You have to use some plugin, that will store edit-time in commentmeta (or some another place) and then you will be able to output it.

Custom post-type child category archive

Having a bit of a headache with WordPress at the moment after days of searching for an answer. I have a custom post-type on a new site called videos, and I want series of videos on the site. I decided to use standard categories for organising these videos into the series.
So, my structure goes:
Videos (post-type) -> Series (Category) -> The Making Of (child-category).
In terms of the hierarchy I have no idea which template would allow me to show all the posts from the child category? I've tried so many variations and none seem to work. And yes, I've been looking at the template hierarchy.
Maybe I'm just missing the obvious, but does anyone know what template is needed to show this child-category? I'd hate to have to make a page each time there's a new series to show.
[UPDATE]
So, I've changed over to a custom taxonomy as suggested in the comment below. And I've managed to get the list of posts from my making-of category showing up in a list. This uses the taxonomy-$term.php template.
This shows in the url mysite.com/series/making-of/.
But, I'm struggling to find a way to display all of the different categories from the post-type on a single page. I thought it would use just the taxonomy.php file but that doesn't seem to work.
I thought the url would have been mysite.com/series/

Limit pagination in wordpress to a post published in certain period

I'm working on a latest version of wp.
I need this kind of functionality but not sure how to do it.
I want to post an blog article which will be available on its main category listing page for set period (from published from & to date - to date is the last date until when it will accessible on category page using pagination. But after to date this will not be list in category using pagination. But still stays on given url and accessible by direct url for SEO reason.
Basically I want to make a pagination to be valid for only a post published under certain period.
Both cases are fine, do you know any plugin which can be used or need to customize?
I don't know about a plugin, but you can simply customize your wp_query: http://codex.wordpress.org/Class_Reference/WP_Query#Time_Parameters, and make sure you use the "paged" parameter described here: http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters

WordPress: Showing posts by categories/tags on the index page

Is it possible to show posts by categories/tags on the index page instead of taking the user to the tag.php and category.php pages?
For example, when the user clicks the 'Uncategorized' category, I would like all the Uncategorized posts to replace the list of posts already there on the index page.
I've been trying to find out if anyone has done this but I've had no luck. I'd really appreciate it if someone could give me a link to somewhere that tells me how to go about doing this or lets me know how to change the code to get this to work.
This can be done. I can not recall a page that has done it but I do know it would require you creating your own custom page template.
http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates is a good place to start learning how the page templates are created.
Some additional links
http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query
http://wordpress.org/support/topic/tag-archive-from-a-single-category-is-this-possible?replies=34

WordPress Post Date Changes On Update

I have my permalinks in WordPress set to the Month and Name setting. This generates URLs like /blog/2009/09/my-post-name. Every time a post is updated, it changes the posting date, which can potentially change the permalink address.
This is wreaking some havoc on my site, as I'll have banner/button ads throughout that point to the permalink. When a post from August is updated in September, all of the ads become broken links until I discover this and change it.
Is there any way to make the original posting date stay static, despite any updates? I'm looking for something like a plug-in or an overlooked setting, as I have multiple authors with varying degrees of computer literacy.
Thanks for any help!
Cory
Update:
Apparantly this is behaviour that others aren't experiencing, so I'm attaching a screen shot of exactly what's happening. Top image is before saving, bottom image is after saving.
(source: opl.on.ca)
Are you sure updating a post changes the permalink? I don't have this behaviour in my installations. What do changes a permalink is changing the post date.
In database, acoording to this schema, we have post__date and post__modified, two different attributes: used in create an update action. If you're having your post-date modified without modifying it directly
Updating a post date in Wordpress http://img18.imageshack.us/img18/3440/wordpresspostdate.png
then I'm afraid some plugin may be changing it's value.
Reading your description, I'm assuming you're using static links to your banners. Try to use a simple plugin that creates these links based on your post id: some simple routine would do it. You can get some information using get_post for example.
<?php
$my_id = 7;
$post_id_7 = get_post($my_id, ARRAY_A);
$slug = $post_id_7['post_name'];
?>
... or even easier with get_permalink. You need just your post id.
<?php
echo get_permalink(7);
?>
So, at least if your permalinks are changing without a reason and you dont know how to fix them, at least you can build them dinamically.
Just read the codex documentation and Function Reference to see what's avaiable to make your life easier!
I run the same permalink settings and don't have trouble with post updates changing the permalink. There are separate editor settings for the permalink and a user has to specifically change the permalink from that editor, which is right under the post title in the text editing box in the post editor. That's a WP thing to keep permalinks from getting broken all the time.
Maybe you should try using a few static pages? That way you can have both a clean permalink: mysite.com/mypermalink/ that won't change, if in fact your post permalinks are changing from a plugin that you need to use.

Resources