This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WP_Query Object | |
( | |
[query_vars] => Array | |
( | |
[page] => | |
[pagename] => blog | |
[error] => | |
[m] => 0 | |
[p] => 0 | |
[post_parent] => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
*/ | |
$args = array( | |
//////Author Parameters - Show posts associated with certain author. | |
'author' => 1,2,3, //(int) - use author id [use minus (-) to exclude authors by ID ex. 'author' => -1,-2,-3,] | |
'author_name' => 'abcde', //(string) - use 'user_nicename' (NOT name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mika Epstein | |
25:16 | |
https://youtu.be/3jUA-z53gvA?t=1517 | |
Should be required. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function filter_media_comment_status( $open, $post_id ) { | |
$post = get_post( $post_id ); | |
if( $post->post_type == 'attachment' ) { | |
return false; | |
} | |
return $open; | |
} | |
add_filter( 'comments_open', 'filter_media_comment_status', 10 , 2 ); |