The media having special characters in its name, may not be visible in the front-end, therefore, we should remove the special character while uploading media in the WordPress dashboard.
Views: 60
The media having special characters in its name, may not be visible in the front-end, therefore, we should remove the special character while uploading media in the WordPress dashboard.
Views: 60
For listing the published year of the particular post type, we can use the SQL as presented below.
<ul id="termsYear">
<?php $years = $wpdb->get_results( "SELECT YEAR(post_date) AS year FROM wp_posts WHERE post_type = 'media' AND post_status = 'publish' GROUP BY year DESC" );
foreach ( $years as $year ) {?>
<li><a data-val='<?=$year->year?>' class="year"><?=$year->year?></a></li>
<?php } ?>
Replace the ‘post_type’ with your own post type.
Views: 31
”Category Order and Taxonomy Terms Order’ plugin’, order Categories and all custom taxonomies terms (hierarchically) using a Drag and Drop Sortable javascript capability.
Views: 30
---' in all forms with the same text:For replacing all ‘—‘ blank value of select , add the below filter in function.php
function kd_wpcf7_form_elements($html) {
$text = 'Select';
$html = str_replace('<option value="">---</option>', '<option value="">' . $text . '</option>', $html);
return $html;
}
add_filter('wpcf7_form_elements', 'kd_wpcf7_form_elements');
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
function kd_wpcf7_form_elements($html) {
function kd_replace_include_blank($name, $text, &$html) {
$matches = false;
preg_match('/<select name="' . $name . '"[^>]*>(.*)<\/select>/iU', $html, $matches);
if ($matches) {
$select = str_replace('<option value="">---</option>', '<option value="">' . $text . '</option>', $matches[0]);
$html = preg_replace('/<select name="' . $name . '"[^>]*>(.*)<\/select>/iU', $select, $html);
}
}
kd_replace_include_blank('subject', 'Subject', $html);
kd_replace_include_blank('country', 'Country', $html);
return $html;
}
add_filter('wpcf7_form_elements', 'kd_wpcf7_form_elements');

Views: 1079
By default, WordPress removes the html tags from the description box of WP Menu items.
Views: 23