• Resolved scamrwordpressadmin

    (@scamrwordpressadmin)


    Hello,
    I have found lots of info on creating a custom template. However, what I need is to have a custom template that has HTML code in the body. This code needs to be editable per page, as there are variables that I need to change that are specific to each page.

    Right now I just cut n’ paste the html from one page to the next…but should I have to change anything globally – well, rather painful. CSS specific formatting is already set up – but I need to change non-css items – things like say adding a Print button, or a Sign up button, etc…

    Can anyone point me to where I might find info on how to accomplish this?

Viewing 1 replies (of 1 total)
  • Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    I was able to create a template whereby I could pass in variables so one template can be reused for multiple hikes. (the template displays information on upcoming hiking club hikes)

    1. Using the Advanced Custom Fields 4.4.7, I created custom fields for the post.

    2. Using get_field() to pull the content of one of the custom fields, and put that into the theme. For example:
    <?php $pageid=get_field(“page_post_id”);?>
    <?php $spec_instruct = get_field(“special_instructions”,$pageid);

    if( $spec_instruct ) {
    echo($spec_instruct);
    }
    ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Create Template page with editable HTML’ is closed to new replies.