New Topic

post template with the content area also templated…

Home › Forum › Customization › post template with the content area also templated…

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2428
    StartupWP
    Keymaster

    It looks like the easiest solution for this is found here:

    http://www.codesynthesis.co.uk/tutorials/adding-custom-fields-to-a-custom-page-template-in-wordpress

    1. Duplicate page.php, naming it something else, perhaps donate.php, then add this to the top of the file:

    <?php /* Template Name: Donate */ ?>

    As well as the following where you want the custom content to appear:

    <?php echo get_post_meta( $post->ID, 'about', true ); ?>

    2. Install this plugin:

    https://wordpress.org/plugins/advanced-custom-fields/installation/

    3. Set up the plugin:

    – Click on ‘Custom Fields’ on the left hand admin menu
    – Click ‘Add new’
    – Under ‘Location’ set the rule to ‘Page Template’ is ‘Equal to’ ‘My custom template’
    – Above the location section click ‘Add field’ and enter the field name. For this demonstration we’ll call the field name ‘custom_about’ with a field type of ‘wysiwig editor’
    – Give the field group a name at the top, in this demo I’ve called it ‘Extra’
    – Click ‘Publish’ on the right hand side

    This may not be the most complete solution for exactly what you’re looking to do, but should get you started. If you need more help we may be able to provide it, but please keep in mind this is a very advanced customization request and may be outside the scope of what we can reasonably assist with.

    Thank you.

    #2430
    jtmiles
    Participant

    Thank you for your impossibly quick response!!

    I will try it and let you know.

    Thanks,
    John

    #2432
    StartupWP
    Keymaster

    You’re welcome. We’ll be here.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.