Custom Meta Box in Custom Post Type
-
Good day,
I created “custom meta box” for custom Post Type. My custom post type name is “SYNOPSIS“.
Now I have 2 type “single” page in my theme folder:
1. single.php (For default wordpress post)
2. single-synopsis.php (For synopsis post)If I using the below code in single-synopsis.php –everything work fine.
<?php if ( get_post_meta( get_the_ID(), '_pt_synopsis_checkbox', true ) ) : ?> // my code in here // <?php else : ?> <?php endif; ?>
But when I using that code in single.php –the code not work for me. I don’t understand why the code not work for me.
Can someone in here help me, please!
Many thanks
Shine
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom Meta Box in Custom Post Type’ is closed to new replies.