/ Published in: PHP

To create a post or page title that is different than the title above the permalink. :: HOW TO :: in the wordpress post or page administration panel -> custum field panel -> name: "customtitle" // value: "Your Post or Page Title".
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<h1> <?php if (get_post_meta($post->ID, "customtitle", true)) : ?> <?php $key="customtitle"; echo get_post_meta($post->ID, $key, true); ?> <?php else : ?> <?php the_title(); ?> <?php endif; ?> </h1>
Comments
