• Resolved jerrycrews1

    (@jerrycrews1)


    I would like to allow my client to edit a table on the static homepage (front-page.php). The part I would like for them to edit is the Workout of the Day table. Any ideas on how to accomplish this?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • There’s no way to allow someone access to only part of a page. You either have to trust them with the whole thing or you don’t.

    That said, there are plugins that will allow you to embed Google docs. You could embed a Google doc and they could just update the doc, which would update automatically on your site when you load the page. Then they wouldn’t even need access to your website.

    Thread Starter jerrycrews1

    (@jerrycrews1)

    Thank you for your response. I have no problem allowing the client full access to the page, I just want them to be able to edit it without going into the code. Like editing a table in a post and it mirroring on the static homepage. Is this possible without plugins?

    Moderator bcworkz

    (@bcworkz)

    Yes! But to protect custom code from updates, you need either a custom plugin or a child theme. One solution involves a custom front page template, and custom templates are best implemented through child themes.

    The custom template could output most of the page as usual, except for the editable table part. That part can be a separate post, page, custom field, anything that would be easier to edit than the full page of HTML. The template then fetches this data from where ever it is stored and outputs it in the proper position with appropriate formatting.

    Instead of a page template, the table could be fetched from its normal location by a shortcode handler and returned. The shortcode is simply part of the normal front page content. The shortcode definition can be part of either a child theme or custom plugin.

    Thread Starter jerrycrews1

    (@jerrycrews1)

    Thank you! I solved this by putting embedding a post in the homepage. When the user updates the post it updates on the homepage.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to allow client to edit a specific area of a static homepage’ is closed to new replies.