Site icon Make Noise

Date Exclusion WordPress Plugin – Daily Blog Tips

[ad_1]

Would your blog benefit from removing the dates of the posts? That is the question I asked on the post “Should We Remove the Timestamp?”. The feedback from the readers was divided. Some people believe that the timestamp is necessary, while others think that removing the date from posts could have advantages, like increasing the number comments and linkbacks for the older content .

It is probably a subjective matter. Removing the date will work for some blogs, and not for others. Regardless of that choice, a lot of people are not comfortable with editing the WordPress theme files to remove the timestamp. Secondly, the raw editing of such files do not provide flexibility. You can either keep the dates on all the posts or removed them all, there is no in between.

With that problem in mind Stephen decided to code a plugin, called Date Exclusion.

Contents

Date Exclusion Plugin

This WordPress plugin gives the user complete control over where and when the timestamp will be displayed. You can exclude them from all posts by default or only on posts older than a few weeks or months. You can also exclude or include dates on a post-by-post level through WordPress’ custom field feature.

Installation

  1. Download and unzip the plugin file
  2. Upload the date-exclusion.php file to your /wp-content/plugins/ directory
  3. Log into your WordPress control panel, click the “Plugins” tab, and click “Activate” next to the Date Exclusion plugin

Configuration

In order to configure the plugin for your needs you will have to open the plugin file (date-exclusion.php). You can do this on the Plugin Editor inside the WordPress control panel.

To exclude date information from all posts by default, set $exclude_date on line 30 equal to ‘yes’. This can be overridden on a post-by-post basis by setting “exclude_date” as a custom field with a value of “no”.

To set a default period of time for every post after which date information should no longer be displayed, set $date_expires on line 33 to the number of days to wait (e.g., 14 for two weeks). This can be overridden on a post-by-post basis by setting “date_expires” as a custom field with a different value (or 0 to deactivate).

To exclude date information from a specific post, set “exclude_date” as a custom field with a value of “yes”.

To make the date of a specific post no longer display after a certain period of time, set “date_expires” as a custom field with a value equal to the number of days you want the date to display.

Version History

Still on the initial release (1.0). Please leave a comment if you encounter any difficulties.

About 

Daniel Scocco is a programmer and entrepreneur located in São Paulo, Brazil. His first company, Online Profits, builds and manages websites in different niches. His second company, Kubic, specializes in developing mobile apps for the iOS and Android platforms.

[ad_2]

Source link

Exit mobile version