Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'widget_tag_cloud_args', 'filter_tag_cloud_widget', 10, 2 );
- function filter_tag_cloud_widget( $args, $instance ) {
- /** Check if Taxonomy is Tags and Element ID or Extra class name settings is footer */
- if ( isset( $args['taxonomy'] ) && 'post_tag' === $args['taxonomy'] && ( 'footer' === $instance['el_id'] || 'footer' === $instance['el_class'] ) ) {
- $tag_id = array( 258, 301, 4224 ); /* Tag ID */
- $args['include'] = $tag_id;
- }
- return $args;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement