This download contains 3 files which produce exactly the same result. Both code snippets enable you to replace the entry title on single posts & pages with a custom title. If no custom title is added, the default title is displayed on single posts and archive pages.
If a custom title is added, it will be shown on single posts and the default title displayed on archive pages.
Demo Video #
Shows the single post entry title displaying the custom field text and the default title displayed on archive pages.
Tested using the Genesis Sample child theme by StudioPress however will work in any Genesis child theme without modification.
Installation Steps #
There’s 2 steps for each solution :
Solution 1
Step 1 – Copy & paste the PHP code from the functions file to the end of your child themes functions.php file.
Step 2 – On the Edit Post screen, scroll down to the Custom Fields box and create a custom field named entry_title ( as seen in the demo video ) and add your custom title to the value field like this :
Solution 2
Step 1 – Upload the file names single.php to your child themes root directory.
Step 2 – On the Edit Post screen, scroll down to the Custom Fields box and create a custom field named entry_title ( as seen in the demo video ) and add your custom title to the value field like this :
Solution 3
Step 1 – Add the code from the file named functions-2.php to the end of your child themes functions.php file. You could also add this code to a file named single.php and remove the conditional tags so it only loads on single posts and the code will only execute if the custom field key named entry_title has a value ( not empty ).
Step 2 – On the Edit Post screen, scroll down to the Custom Fields box and create a custom field named entry_title ( as seen in the demo video ) and add your custom title to the value field like this :
Was This Tutorial Helpful?