Tag Info

Hot answers tagged


Yes it is possible, but there isn't much point in that. The crudest way is to use a filter on the result of getting the 'rewrite_rules' option, and manipulating it by adding the entries you require directly to the array, and then you might need to filter those rules out when the option is updated. The thing is that it is most likely a waste of time as as in ...


You can set the rewrite slug when you register your post type: $args = array( 'rewrite' => array( 'slug' => 'media/lajmet' ) // other args... );


The WP function get_attached_media() should provide the info you need. If used in this way... $media = get_attached_media( 'image' ); ... the $media var should contain the wp_post objects for all attached images. Function documentation in the WP Codex: https://codex.wordpress.org/Function_Reference/get_attached_media

Only top voted, non community-wiki answers of a minimum length are eligible