Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

get-posts

Function to check if author has posted within the last x days

August 2, 2022August 1, 2022 by Magenaut

Is is possible to check whether an author has posted in the last X days?

Categories Q&A, Wordpress Tags author, functions, get-posts, wp-query Leave a comment

Setting pagination for images attached to a post

August 2, 2022August 1, 2022 by Magenaut

I am trying to figure out how to paginate a post for it’s images. I have a custom post type set up to act like a gallery – images only. And would like to paginate the images. I am having a hard time trying to figure out where to start with this.

Categories Q&A, Wordpress Tags get-posts, pagination, posts Leave a comment

List ‘n’ number of posts from a Tag, each with a different class or ID

August 2, 2022August 1, 2022 by Magenaut

I want to list ‘n’ number of posts (ordered by latest first) — post’s title linked to the post’s permalink — from a tag on my WordPress blog. I also want to assign each link its own class or ID.

Categories Q&A, Wordpress Tags get-posts, tags Leave a comment

Query for custom post type?

August 2, 2022August 1, 2022 by Magenaut

I have installed the Custom Post Type UI plugin. After activation of this plugin I have created a custom post type called portfolio. Now I want to use this on the portfolio page in the front-end. How do I fetch all post that are of custom post type portfolio? Answers: Thank you for visiting the … Read more

Categories Q&A, Wordpress Tags custom-post-types, get-posts Leave a comment

How to return results of a get_posts() in explicitly defined order

August 2, 2022August 1, 2022 by Magenaut

I’m trying to create a loop of explicity ordered posts, for example:

Categories Q&A, Wordpress Tags get-posts, loop, query-posts, sort Leave a comment

Query Posts or Get Posts by custom fields, possible?

August 2, 2022August 1, 2022 by Magenaut

If I were to take a standard query post.

Categories Q&A, Wordpress Tags custom-field, get-posts, query-posts Leave a comment

Problem: ( kriesi ) pagination doesn’t work in homepage

August 2, 2022August 1, 2022 by Magenaut

When I set this template as homepage, pagination doesn’t work. I see the buttons, but when I click the button for page 2, nothing happens, doesn’t go on page 2, it still remain in page 1. What is wrong? Where is the mistake? I read all posts from here & from internet about this issue, … Read more

Categories Q&A, Wordpress Tags get-posts, page-template, pagination Leave a comment

get_posts assigned to a specific custom taxonomy term, and not the term’s children

August 2, 2022August 1, 2022 by Magenaut

Say I have the following taxonomy terms:

Categories Q&A, Wordpress Tags custom-taxonomy, get-posts, hierarchical, terms Leave a comment

setup_postdata() does not seem to be working?

August 2, 2022August 1, 2022 by Magenaut

I am not sure why but I have used get_posts() to query for some data. Then I used setup_postdata() … I think its used so that I can use functions like the_permalink() etc with the new post data?

Categories Q&A, Wordpress Tags get-posts Leave a comment

get all posts ID from a category

August 1, 2022July 31, 2022 by Magenaut

Problem: I need to get an array of ID’s of posts from a given category If the category have any posts. This is to be used on a plugin options page.

Categories Q&A, Wordpress Tags get-posts, id, posts Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Page4 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress