Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
HTMLPad 2018 15.5
WeBuilder 2018 15.5
SentiMask SDK Trial 2.0.0
Track Order For Magento 2 1.0.0
Calendar 365 For Dynamics CRM 4.0
Scimbo 1.2
Odoo Furnito Theme 1.0
.Net Assemblies/WSDL Import Utility for Delphi 6.0.4.0
Devart Excel Add-in for Zendesk 1.7
Excel Add-in for Marketo 1.7
GetOrgChart 2.5.3
AnyGantt JS Gantt Charts 8.6.0
AnyChart JS Charts and Dashboards 8.6.0
Multi Vendor Ecommerce Script & Apps 4.0
Magento 2 Inventory Management Extension 1.0
Top Rated
VisualNEO Web 2018.12.15
Paste phpSoftPro 1.4.1
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
WP Extra Template Tags 0.4
File ID: 96428






WP Extra Template Tags 0.4
Download WP Extra Template Tags 0.4http://wordpress.orgReport Error Link
License: Freeware
File Size: 10.0 KB
Downloads: 1
Submit Rating:
WP Extra Template Tags 0.4 Description
Description: Wordpress template tags

To make it easy to edit themes and plugins there are many build in template tags within the Wordpress code. I did not found all the tags I wanted so I created them and now provides as a plugin.

For usage go to "Installation"
Updates

0.4 - _get_category_count() and _category_count() functions updated
0.3 - _get_depth(), _is_child(), is_grandchild() functions created
0.2 - _get_the_content_with_formatting() function created
0.1 - Plugin created

Prevents collisions

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.
Add an extra template tag

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 web-templates.nu

Installation :

1. Upload the FOLDER 'wp-extra-template-tags' to the '/wp-content/plugins/'
2. Activate the plugin 'WP Extra Template Tags' through the 'Plugins' menu in admin
3. Call the functions of your choice from your theme or plugin

Category ID

Displays or returns the numeric ID of the category a post belongs to. This tag must be used within The Loop.

<?php _category_ID(); ?>
<?php echo _get_category_ID(); ?>

Category Parent ID

Displays or returns the numeric parent ID of the category a post belongs to. This tag must be used within The Loop.

<?php _category_parent_ID(); ?>
<?php echo _get_category_parent_ID(); ?>

Category Slug

Displays or returns the category slug/nicename of the category a post belongs to. This tag must be used within The Loop.

<?php _category_slug(); ?>
<?php echo _get_category_slug(); ?>

Category Name

Displays or returns the name/title of the category a post belongs to. This tag must be used within The Loop.

<?php _category_name(); ?>
<?php echo _get_category_name(); ?>

Category Count

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.

<?php _category_count(); ?>
<?php _category_count(3); ?>
<?php _category_count('about'); ?>
<?php echo _get_category_count(); ?>
<?php echo _get_category_count(3); ?>
<?php echo _get_category_count('about'); ?>

Get Category Name By ID

Returns the name/title of the category ID.

<?php echo _get_category_name_by_ID(3); ?>

Get Category ID By Name

Returns the ID of the category slug/nicename.

<?php echo _get_category_ID_by_name('about'); ?>

User ID

Displays or returns the user ID of the logged in user.

<?php _user_id(); ?>
<?php echo _get_user_id(); ?>

User Name

Displays or returns the user name of the logged in user.

<?php _user_name(); ?>
<?php echo _get_user_name(); ?>

User Level

Displays or returns the user level of the logged in user.

<?php _user_level(); ?>
<?php echo _user_level(); ?>

ID by Page Name

Returns the page ID by page or post slug/nicename.

<?php echo _get_ID_by_page_name('about'); ?>

Name by Page ID

Returns the page slug/nicename by page or post ID.

<?php echo _get_name_by_page_ID(3); ?>

Max Pages

Displays or returns the max amount of pages per post. This tag must be used within The Loop.

<?php _max_pages(); ?>
<?php echo _get_max_pages(); ?>

Depth

Returns the depth of a page. It can be used with a page ID or empty used within The Loop.

<?php echo _get_depth(); ?>
<?php echo _get_depth(3); ?>

Is Child

Returns true if the current page is a child. It can be used with a page ID or empty used within The Loop.

<?php if(_is_child()) { echo 'This is a child page'; } ?>
<?php if(_is_child(3)) { echo 'This is a child page'; } ?>

Is Grandchild

Returns true if the current page is a grandchild.

<?php if(_is_grandchild()) { echo 'This is a grandchild page'; } ?>

Delete Post Link

Displays a link to delete current post or page for logged in administrators. Be careful!

<?php _delete_post_link(); ?>

Get The Content with Formatting

Returns get_the_content() tag WITH formatting like the_content().

<?php echo _get_the_content_with_formatting(); ?>

Parent Permalink

Displays or returns the parent permalink. This tag must be used within The Loop.

<?php _parent_permalink(); ?>
<?php echo _get_parent_permalink(); ?>

Permalink by Name

Displays or returns the permalink by page or post slug/nicename.

<?php _permalink_by_name('about'); ?>
<?php echo _get_permalink_by_name('about'); ?>

License: Freeware

Related: fgtlt fphp, returns, looplt fphp, Category, Template, fgtcategory, belongs, Functions, logged, 039this, Child, Wordpress, Page, userlt fphp, Plugin, extra, empty, fgtuser, namedisplays, wp

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 1



More Similar Code

Template Tag Shortcodes is a plugin that turns many of the WordPress template tags into easy-to-use shortcodes.

This plugin was created so end users could make use of the template tags within their posts and pages. Currently, this plugin creates 40+ shortcodes for use. Not all template tags are available as shortcodes, but you are more than welcome to request others be added.

See the FAQ or the included readme.html for a...



Inject an array of posts into a WP query object as if queried, particularly useful to allow use of standard template tags.

WordPress's template tags are intended to be used within 'the loop'. The loop is managed by a WP_Query object...



"Wp-Fast-Sort Tags" allows you to create a page with the list of all tags sorted by name and then have all the posts related to this tag.

Installation :

1. Copy the the whole folder "Wp-Fast-Sort-Tag"...



This plugin creates two new template tags (next_post_link_plus and previous_post_link_plus) which are upgraded versions of the core WordPress next/previous post link template tags. The new tags include all of the functionality of the core tags,...



Use widgets or template tags to easily retrieve and control the display of any custom field values/meta data for posts or pages.

The power of custom fields gives this plugin the potential to be dozens of plugins all rolled into one.



Adds two template tags, latest_post_date() and latest_post_modified_date(), the first echoes the most recent post publication date, the second echoes the modification date of the most recently modified post.

Each template tag takes two...



This plugin provides shortcodes and template tags for next/previous navigation in pages. Includes a code and tag for the parent page, allowing Drupal-like book navigation.

Installation :

1. Upload the next-page directory to...



Provides a simple-to-use widget and, if you want to use them, two template tags (theme functions): wp_janesguide_award() and wp_janesguide_icon(). These functions display an image of one of two awards in the case of the former or a generic...



Template tags (for use in single.php) to create post navigation loop (previous to first post is last post; next/after last post is first post).

next_or_loop_post_link() is identical to WordPress's `next_post_link()` in every way except...



This plugin extends wordpress by a series of template tags and a few sidebar widgets.


Extended Tags:

* wkc_recent_comments() this tag will display a list of latest comments
* wkc_recent_pings() this tag will...

User Review for WP Extra Template Tags
- required fields
     

Please enter text on the image