Support » Theme: MesoColumn » Remove date time stamp from CPT

  • This theme is awesome, but i want to know only one thing. Can someone please tell me How can i remove the date/time stamp from a particular post type ? or whether it is possible at all !

Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author Richie KS

    (@rkcorp)

    try add this to functions.php

    function dez_remove_cpt_postdate() {
    global $post;
    if( is_singular() && get_post_type != 'post') {
    echo '<style>'; ?>
    #custom span.post-date { display:none !important; }
    <?php
    echo '</style>';
    }
    }
    add_action('wp_head','dez_remove_cpt_postdate');
    Thread Starter SoujanyaWp

    (@soujanyawp)

    Thank you for your quick reply..! But i want to confirm one thing, in the above code should i replace the ‘post’ with my CPT name & can i use more than one cpt by just putting a COMMA in between them, just like ‘post’,’cpt1′,’cpt2′ etc…

    Theme Author Richie KS

    (@rkcorp)

    replace this
    if( is_singular() && get_post_type != ‘post’) {

    with

    if( is_singular() && ( get_post_type == ‘CPT1’ || get_post_type == ‘CPT2’) ) {

    Theme Author Richie KS

    (@rkcorp)

    get_post_type

    should be

    get_post_type()

    Thread Starter SoujanyaWp

    (@soujanyawp)

    Okay, thank you..! And can i put the code in a custom made functions plugin instead of functions.php, bcoz i dont want to overload the file..!

    Thread Starter SoujanyaWp

    (@soujanyawp)

    And thanx once again for your amazing support..!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove date time stamp from CPT’ is closed to new replies.