Planned private posts get published immediately

The problem is that changing the post visibility to private invokes a status change, in a way private is not only a visibility but also a publishing status. Or to quote the WordPress Codex, section »Content Visibility – Private Content«. Once you change the visibility to private, the post or page status changes to “Privately … Read more

the_posts filter been called multiple time

‘the_posts’ is an action fired everytime WP_Query get posts, for main query and for other secondary queries, so when you do something like: $foo = new WP_Query($args); in a widget or elsewhere (shortcode, related posts…) ‘the_posts’ is triggered again. However there is only one main query, so you can use a conditional and do what … Read more

Does an article (post) id ever change?

No they don’t change, but you shouldn’t rely on them for external sites. If we’re talking about purely in the database on an individual WordPress site, then: If it’s a published/established post/page then yes, the ID will not change other than to delete it If its a revision, a draft, etc the ID won’t change, … Read more

get custom image size

If you know the image’s ID : wp_get_attachment_image( $image->ID, array(200, 112) ); returns an HTML img element or empty string on failure. The entire code could be something like : <a href=”https://wordpress.stackexchange.com/questions/170690/<?= get_attachment_link(“5435′ ); ?>”> <?= wp_get_attachment_image( ‘5435’, array(200, 112) ); ?> </a>