Filter and Hooks

SQL Query to get the archive / year by post type

For listing the published year of the particular post type, we can use the SQL as presented below.

Replace the ‘post_type’ with your own post type.

Hits: 14

Filter and Hooks

Filter to set blank value instead of default “—” in the drop down list of contact form 7

  1. Replace all ‘---' in all forms with the same text:

For replacing all  ‘—‘  blank value of   select , add the  below filter in function.php

We can replace the  $text variable with any text.

2.  Replace the select element blank value with  unique text.

For replacing the select elements blank with unique text add the following filter in function.php


Hits: 192