Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 504799

Add {taxonomies} to wp_tags

$
0
0

Replies: 0

Hello Amir,
Thanks for this great plugin, I add some code to your plugin to print taxonomies especially for post types and custom categories.
The changes that were:
* functions.php add after this line 484:

$taxonomies=get_taxonomies('','names');
$taxonomies_array = wp_get_post_terms($ID,$taxonomies, array( 'fields' => 'names' ));

* Also add after this line 490:

foreach ($taxonomies_array as $taxonomy) {
	$taxonomies .= " | ".$taxonomy;
}

* update this line :
$wp_tags = array("{ID}","{title}","{excerpt}","{content}","{author}","{short_url}","{full_url}","{tags}","{categories}");
To :
$wp_tags = array("{ID}","{title}","{excerpt}","{content}","{author}","{short_url}","{full_url}","{tags}","{categories}","{taxonomies}");
* Add new element to $wp_subs that’s name : $taxonomies at end.

You can edit above codes if there’s any mistakes 🙂

Thanks again.


Viewing all articles
Browse latest Browse all 504799

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>