Posts

Replace permalink with 'your_acf_field_name' your ACF

Image
  function my_custom_permalink_filter( $post_link, $post ) { if ( 'news-articals' === $post->post_type ) { // Target your specific post type name here $acf_field_value = get_field( 'url', $post->ID ); // Replace 'your_acf_field_name' with your ACF field name if ( $acf_field_value ) { $post_link = $acf_field_value; // Replace the tag with the sanitized ACF value } } return $post_link; } add_filter( 'post_type_link', 'my_custom_permalink_filter', 10, 2 );

Shortcode to display "news-articals" custom post type

Image
 // Shortcode to display "news-articals" custom post type function shortcode_news_articals() {     ob_start(); // Start output buffering     // Query      $the_query = new WP_Query(array(         'post_type'      => 'news-articals',         'posts_per_page' => -1,         'post_status'    => 'publish', 'meta_key'       => 'date',           // the ACF field name 'orderby'        => 'meta_value_num', // order by numeric value 'order'          => 'DESC',           // or 'ASC'     ));     if ( $the_query->have_posts() ) : ?>         <div class="newsarticals">         <?php while ( $the_query->have_posts() ) : $the_query->the_post(); $da...

New Castle Concerned Citizens Newsletter if not send automatically, Send this to Manually

Image
https://newcastleconcernedcitizens.com/wp-admin/admin.php?page=newsletter_system_scheduler  <input id="" class="button-primary tnpc-button" type="submit" value="Run manually" onclick="this.form.act.value='trigger';return true;">

True Words

 लम्बा दागा या लम्बी जुबान। हमेशा उलज जाते हैं। इस लिए दागा लपेट कर या जुबान समेट कर रखनी चाहिए ।

Custom Functions Wordpress.

 <?php  /* Service Post Start */ function register_services_post_type() {     $labels = array(         'name'               => _x('Services', 'post type general name'),         'singular_name'      => _x('Service', 'post type singular name'),         'menu_name'          => _x('Services', 'admin menu'),         'name_admin_bar'     => _x('Service', 'add new on admin bar'),         'add_new'            => _x('Add New', 'service'),         'add_new_item'       => __('Add New Service'),         'new_item'           => __('New Service'),         'edit_item'          => __('Edit Service'), ...

How to add Breadcrumbs in the wordpress?

  http://www.qualitytuts.com/wordpress-custom-breadcrumbs-without-plugin/ Step 1 Breadcrumbs are the important part of our website, in wordpress there are several plugins are available for this, but below i posted the code for custom breadcrumbs for our wordpress site. Just add this below code in to your current wordpress theme functions.php and call the second step. <?php function qt_custom_breadcrumbs () { $ showOnHome = 0 ; // 1 - show breadcrumbs on the homepage, 0 - don't show $ delimiter = ' &raquo; ' ; // delimiter between crumbs $ home = ' Home ' ; // text for the 'Home' link $ showCurrent = 1 ; // 1 - show current post/page title in breadcrumbs, 0 - don't show $ before = ' <span class="current"> ' ; // tag before the current crumb $ after = ' </span> ' ; // tag after the current crumb global $ post ; $ homeLink = get_bloginfo ( ' url ' ); if ( is_home () || is_...