435 reputation
535
bio website travis.pflanz.me
location Kansas City, MO
age 34
visits member for 2 years, 4 months
seen Jul 28 at 17:18

I am a code hacker... Meaning I find pieces of code and hack them together to get something mangled and ugly, but usually operational!


Apr
12
comment Display list of most used tags in the last 30 days
<ul id="footer-tags"> <?php global $wpdb; $term_ids = $wpdb->get_col(" SELECT DISTINCT term_taxonomy_id FROM $wpdb->term_relationships INNER JOIN $wpdb->posts ON $wpdb->posts.ID = object_id WHERE DATE_SUB(CURDATE(), INTERVAL 3 DAY) <= $wpdb->posts.post_date"); if($term_ids > 0){ $tags = get_tags(array( 'orderby' => 'count', 'order' => 'DESC', 'number' => 28, 'include' => $term_ids, )); foreach ( (array) $tags as $tag ) { echo '<li><a href="' . get_tag_link ($tag->term_id) . '" rel="tag">' . $tag->name . '</a></li>'; } } ?> </ul>
Apr
12
comment Display list of most used tags in the last 30 days
I have emptied the trash. I have no custom post types. I have three drafts, their last update dates are: 4/7, 4/5, 4/2. Now 9 tags are being displayed. Here is the complete code I am using (minus CSS, of course)
Apr
12
awarded  Analytical
Apr
12
answered Comment author url link is wrong? How to change from authors/ to author/
Apr
12
comment Minimum Dimensions Requirement for Featured Image?
@ungestaltbar, sounds like you have the right idea. I am no coder, so I am at the mercy of the community.
Apr
12
comment Minimum Dimensions Requirement for Featured Image?
Thanks for the reply. This does not do what I need, however. The website is a MLB baseball website, so a random picture of Albert Pujols will not work to be added to an article about Prince Fielder, if you get what I mean... Also, as I mentioned above, I use the WyPiekacz plugin to force users to add a featured image. So, the issue is not whether they add an image, but instead that I want to force them to add an image that is larger than 640 wide and 360 tall.
Apr
11
comment Minimum Dimensions Requirement for Featured Image?
I need to restrict a user from attaching an image that is too small, not restrict it from displaying if it is too small. Every post MUST include an image. Every post will display an image.
Apr
11
comment Plugin to restrict non-admin user to existing tags
Glad it fit your needs. I will let you know if I find a predictive text option. Let me know if you find one as well.
Apr
11
awarded  Promoter
Apr
11
comment Display list of most used tags in the last 30 days
Thanks for the code. I changed INTERVAL 30 DAY to INTERVAL 3 DAY to test it out. I left the number of tags at 28. 11 tags were pulled. Today is April 11 - The tags pulled by the function were last used on - 4/9, 4/11, 4/10, 4/2, 4/2, 3/31, 4/2, 4/3, 4/3, 4/6
Apr
11
revised Display list of most used tags in the last 30 days
removed extra closing tag
Apr
11
revised Plugin to restrict non-admin user to existing tags
added previously unrealized fact
Apr
11
answered Plugin to restrict non-admin user to existing tags
Apr
11
revised Create citation and url in post using 3 custom fields with conditions for each field… So close!
edit to include all requirement situations
Apr
11
suggested suggested edit on Create citation and url in post using 3 custom fields with conditions for each field… So close!
Apr
11
comment Plugin to restrict non-admin user to existing tags
Curious, with 1000s of tags for users to choose from, how do you envision users selecting their tags? I ask so maybe others can find a more accurate solution.
Apr
11
comment How to create a linked tag list in my sidebar
Glad it worked for you. I actually needed this exact thing yesterday, so I'm glad I could help. I removed the extra ")" in the code. Give the answer a check mark, since it worked for you. Thanks.
Apr
11
revised How to create a linked tag list in my sidebar
removed extra ")"
Apr
11
comment Plugin to restrict non-admin user to existing tags
There are two options in the Tags meta box: 1 - Enter your own tags. 2 - "Choose from the most used tags". The code only hides the ability to enter new tags.
Apr
11
revised How to create a linked tag list in my sidebar
cleaned up code