{"id":3594,"date":"2008-08-28T09:27:32","date_gmt":"2008-08-28T09:27:32","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-extra-template-tags\/"},"modified":"2008-09-21T14:40:50","modified_gmt":"2008-09-21T14:40:50","slug":"wp-extra-template-tags","status":"publish","type":"plugin","link":"https:\/\/kea.wordpress.org\/plugins\/wp-extra-template-tags\/","author":219229,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.4","stable_tag":"0.4","tested":"2.6","requires":"2.5","requires_php":"","requires_plugins":"","header_name":"WP Extra Template Tags","header_author":"Jens T&ouml;rnell","header_description":"","assets_banners_color":"","last_updated":"2008-09-21 14:40:50","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/www.web-templates.nu\/2008\/08\/25\/wp-extra-template-tags\/","header_author_uri":"http:\/\/www.web-templates.nu","rating":0,"author_block_rating":0,"active_installs":70,"downloads":4244,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.2","0.3","0.4"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[170,2662,86,609,975],"plugin_category":[43,57],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-3594","plugin","type-plugin","status-publish","hentry","plugin_tags-page","plugin_tags-permalink","plugin_tags-post","plugin_tags-tags","plugin_tags-template","plugin_category-customization","plugin_category-taxonomy","plugin_committers-jenst"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-extra-template-tags.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<h4>Wordpress template tags<\/h4>\n\n<p>To make it easy to edit themes and plugins there are many build in <a href=\"http:\/\/codex.wordpress.org\/Template_Tags\">template tags<\/a> within the Wordpress code. I did not found all the tags I wanted so I created them and now provides as a plugin.<\/p>\n\n<p>For usage go to \"<a href='http:\/\/wordpress.org\/extend\/plugins\/wp-extra-template-tags\/installation\/'>Installation<\/a>\"<\/p>\n\n<h4>Updates<\/h4>\n\n<pre><code>0.4 - _get_category_count() and _category_count() functions updated\n0.3 - _get_depth(), _is_child(), is_grandchild() functions created\n0.2 - _get_the_content_with_formatting() function created\n0.1 - Plugin created\n<\/code><\/pre>\n\n<h4>Prevents collisions<\/h4>\n\n<p>Every extra template tag with this plugin has an underscore before the function name. That is to prevent collisions if the Wordpress team develop the functions in the future.<\/p>\n\n<h4>Add an extra template tag<\/h4>\n\n<p>If you have an own extra template tag, send it to me and if it is a good one I will include it in the next plugin update. For bug reports, donations, feedback, more plugins and themes visit <a href=\"http:\/\/www.web-templates.nu\/2008\/08\/25\/wp-extra-template-tags\/\" title=\"web-templates.nu\">web-templates.nu<\/a><\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the FOLDER 'wp-extra-template-tags' to the '\/wp-content\/plugins\/'<\/li>\n<li>Activate the plugin 'WP Extra Template Tags' through the 'Plugins' menu in admin<\/li>\n<li>Call the functions of your choice from your theme or plugin<\/li>\n<\/ol>\n\n<h4>Category ID<\/h4>\n\n<p>Displays or returns the numeric ID of the category a post belongs to. This tag must be used within The Loop.<\/p>\n\n<pre><code>&lt;?php _category_ID(); ?&gt;\n&lt;?php echo _get_category_ID(); ?&gt;\n<\/code><\/pre>\n\n<h4>Category Parent ID<\/h4>\n\n<p>Displays or returns the numeric parent ID of the category a post belongs to. This tag must be used within The Loop.<\/p>\n\n<pre><code>&lt;?php _category_parent_ID(); ?&gt;\n&lt;?php echo _get_category_parent_ID(); ?&gt;\n<\/code><\/pre>\n\n<h4>Category Slug<\/h4>\n\n<p>Displays or returns the category slug\/nicename of the category a post belongs to. This tag must be used within The Loop.<\/p>\n\n<pre><code>&lt;?php _category_slug(); ?&gt;\n&lt;?php echo _get_category_slug(); ?&gt;\n<\/code><\/pre>\n\n<h4>Category Name<\/h4>\n\n<p>Displays or returns the name\/title of the category a post belongs to. This tag must be used within The Loop.<\/p>\n\n<pre><code>&lt;?php _category_name(); ?&gt;\n&lt;?php echo _get_category_name(); ?&gt;\n<\/code><\/pre>\n\n<h4>Category Count<\/h4>\n\n<p>Displays or returns the number of posts within a category. It can be used with a post ID, post slug (nicename) or empty used within The Loop.<\/p>\n\n<pre><code>&lt;?php _category_count(); ?&gt;\n&lt;?php _category_count(3); ?&gt;\n&lt;?php _category_count('about'); ?&gt;\n&lt;?php echo _get_category_count(); ?&gt;\n&lt;?php echo _get_category_count(3); ?&gt;\n&lt;?php echo _get_category_count('about'); ?&gt;\n<\/code><\/pre>\n\n<h4>Get Category Name By ID<\/h4>\n\n<p>Returns the name\/title of the category ID.<\/p>\n\n<pre><code>&lt;?php echo _get_category_name_by_ID(3); ?&gt;\n<\/code><\/pre>\n\n<h4>Get Category ID By Name<\/h4>\n\n<p>Returns the ID of the category slug\/nicename.<\/p>\n\n<pre><code>&lt;?php echo _get_category_ID_by_name('about'); ?&gt;\n<\/code><\/pre>\n\n<h4>User ID<\/h4>\n\n<p>Displays or returns the user ID of the logged in user.<\/p>\n\n<pre><code>&lt;?php _user_id(); ?&gt;\n&lt;?php echo _get_user_id(); ?&gt;\n<\/code><\/pre>\n\n<h4>User Name<\/h4>\n\n<p>Displays or returns the user name of the logged in user.<\/p>\n\n<pre><code>&lt;?php _user_name(); ?&gt;\n&lt;?php echo _get_user_name(); ?&gt;\n<\/code><\/pre>\n\n<h4>User Level<\/h4>\n\n<p>Displays or returns the user level of the logged in user.<\/p>\n\n<pre><code>&lt;?php _user_level(); ?&gt;\n&lt;?php echo _user_level(); ?&gt;\n<\/code><\/pre>\n\n<h4>ID by Page Name<\/h4>\n\n<p>Returns the page ID by page or post slug\/nicename.<\/p>\n\n<pre><code>&lt;?php echo _get_ID_by_page_name('about'); ?&gt;\n<\/code><\/pre>\n\n<h4>Name by Page ID<\/h4>\n\n<p>Returns the page slug\/nicename by page or post ID.<\/p>\n\n<pre><code>&lt;?php echo _get_name_by_page_ID(3); ?&gt;\n<\/code><\/pre>\n\n<h4>Max Pages<\/h4>\n\n<p>Displays or returns the max amount of pages per post. This tag must be used within The Loop.<\/p>\n\n<pre><code>&lt;?php _max_pages(); ?&gt;\n&lt;?php echo _get_max_pages(); ?&gt;\n<\/code><\/pre>\n\n<h4>Depth<\/h4>\n\n<p>Returns the depth of a page. It can be used with a page ID or empty used within The Loop.<\/p>\n\n<pre><code>&lt;?php echo _get_depth(); ?&gt;\n&lt;?php echo _get_depth(3); ?&gt;\n<\/code><\/pre>\n\n<h4>Is Child<\/h4>\n\n<p>Returns true if the current page is a child. It can be used with a page ID or empty used within The Loop.<\/p>\n\n<pre><code>&lt;?php if(_is_child()) { echo 'This is a child page'; } ?&gt;\n&lt;?php if(_is_child(3)) { echo 'This is a child page'; } ?&gt;\n<\/code><\/pre>\n\n<h4>Is Grandchild<\/h4>\n\n<p>Returns true if the current page is a grandchild.<\/p>\n\n<pre><code>&lt;?php if(_is_grandchild()) { echo 'This is a grandchild page'; } ?&gt;\n<\/code><\/pre>\n\n<h4>Delete Post Link<\/h4>\n\n<p>Displays a link to delete current post or page for logged in administrators. Be careful!<\/p>\n\n<pre><code>&lt;?php _delete_post_link(); ?&gt;\n<\/code><\/pre>\n\n<h4>Get The Content with Formatting<\/h4>\n\n<p>Returns get_the_content() tag WITH formatting like the_content().<\/p>\n\n<pre><code>&lt;?php echo _get_the_content_with_formatting(); ?&gt;\n<\/code><\/pre>\n\n<h4>Parent Permalink<\/h4>\n\n<p>Displays or returns the parent permalink. This tag must be used within The Loop.<\/p>\n\n<pre><code>&lt;?php _parent_permalink(); ?&gt;\n&lt;?php echo _get_parent_permalink(); ?&gt;\n<\/code><\/pre>\n\n<h4>Permalink by Name<\/h4>\n\n<p>Displays or returns the permalink by page or post slug\/nicename.<\/p>\n\n<pre><code>&lt;?php _permalink_by_name('about'); ?&gt;\n&lt;?php echo _get_permalink_by_name('about'); ?&gt;\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt>How do I report a bug?<\/dt>\n<dd><p>Contact me <a href=\"http:\/\/www.web-templates.nu\/2008\/08\/25\/wp-extra-template-tags\/\">here<\/a>. Describe the problem as good as you can, your plugin version, Wordpress version and possible conflicting plugins and so on.<\/p><\/dd>\n<dt>How can I support this plugin?<\/dt>\n<dd><p>The best way to contribute is to spread the word, link to <a href=\"http:\/\/www.web-templates.nu\/2008\/08\/25\/wp-extra-template-tags\/\">WP Extra Template Tags<\/a>, blog about WP Extra Template tags or give me feedback. All kinds of feedback are helpful to me. Suggestions and bug report are also welcome.<\/p><\/dd>\n<dt>Where can I use the extra template tags?<\/dt>\n<dd><p>You could use them in your theme. If you want you can use them within plugins as well.<\/p><\/dd>\n\n<\/dl>","raw_excerpt":"This plugin provides Wordpress users with extra template tags. It can be used in themes or plugins.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/kea.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/3594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kea.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/kea.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/kea.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=3594"}],"author":[{"embeddable":true,"href":"https:\/\/kea.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jenst"}],"wp:attachment":[{"href":"https:\/\/kea.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=3594"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/kea.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=3594"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/kea.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=3594"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/kea.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=3594"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/kea.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=3594"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/kea.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=3594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}