First Chapter
The need for a page to exist in the database to link the template with a path on the site is very aggravating, however. It is possible to programmatically generate the necessary page row using wp_insert_post(), and to arrange things in plugin or theme code such that the page is created only if needed, and deleted when the plugin or theme is inactivated. This seems painful and clumsy, however. All I want is the ability to specify a path and have a page served at that path by WordPress, with the definition existing entirely in theme or plugin code, and without the need to play around with adding a page or post that administrators can see and perhaps accidentally delete or edit.
Digging around for a better solution took some time, but it turns out that it is possible to use the internal rewrite rules and a few related hooks in WordPress to more closely achieve the goal of a virtual page defined in code. Of course, being WordPress, the approach that works isn’t particularly intuitive. It is not a strategy that you would reach on your own unless you happen to be very familiar with WordPress internals. In short, this is how it is done:
- Use a query_vars filter to add one or more new query string parameters recognized by WordPress. E.g. add a
virtualpageparameter. - Use the init action to add rewrite rules directing desired virtual page paths to the new query string. E.g.
/interesting-thingsto/index.php?virtualpage=interesting-things. - Use a template_include filter to serve each rewritten virtual page path with the appropriate virtual page template, or serve a 404 page for an invalid request.
- Lastly, add mod_rewrite rules to
/.htaccessto add trailing slashes where appropriate. E.g. set up a redirect to send^interesting-things$to/interesting-things/.
The following is an example implementation, and could be placed in either theme or plugin code. The template, as it stands, would have to be in the active theme.
Book Club
If you are interested in an author appearance (via phone, Skype, or in person) at your book club meeting, please contact Kim Hooper. These questions may help fuel your discussion of People Who Knew Me.
[Pick up list from existing site: http://kimhooperwrites.com/book-club/]
- Emily does not have a close relationship with her mother. How do you think her upbringing shapes her character and relationships? How does it influence the way she mothers Claire?
- Do you think the failure of Emily and Drew’s marriage is due to innate incompatibilities or life circumstances? Would they have stayed together if Drew’s mother had not fallen ill?
- Do you think Emily and Gabe have a true love, or is the relationship more of an escape for Emily?
- How do you think Emily and Drew could have better handled the challenge of caregiving?
- Do you see Emily’s decision to flee New York after 9/11 as impulsive? Or does it just become the unexpected final part of an escape she’s been contemplating for some time?
- Do you see Emily as cowardly, courageous, or simply human?
- The title of the book, PEOPLE WHO KNEW ME, references the life Connie left behind in New York. How do those people “follow” Connie to California?
- In California, Connie vows to keep people at arm’s length. How does she succeed at this? How does she fail, in spite of herself?
- What were your feelings when learning the true identity of Claire’s father?
- Connie’s cancer diagnosis prompts her to tell Claire about Drew. She says she would have told Claire at some point in the future. Do you believe her, or do you think she never would have revisited the past if given the choice?
- How do you envision Claire’s future relationship with Drew?
- Do you think Drew has (or will) forgive Connie? What would you do if you were him?
- What do you think will become of Connie? What about her relationship with Paul?
[3.0: CONTACT: kimhooperwrites.com/contact/]
Contact
Send an email to KimHooperWrites@gmail.com if you want to:
- Say hello
- Discuss a book
- Schedule a book club meeting or event appearance
- Request an interview
- Share cute pet photos
Thanks for your interest!
Reviews
[TEST - PLEASE UPDATE] “Kim Hooper’s debut novel, 'People Who Knew Me,' is not about the terrible events of 9/11 and how people reacted to them. It is instead a close and affecting study of how the choices we make, both the altruistic and the most selfish equally, expose life’s tragic truths... Refreshingly raw and honest, 'People Who Knew Me' invites us deep into the world of degenerative illness. Ms. Hooper captures the intimate details with edgy, dark humor... Written as a series of interwoven flashbacks, 'People Who Knew Me' has a sharp edge of emotional trauma and disappointment. It is very easy to love Emily—she is like any of us, struggling to make the best decisions she can. Ms. Hooper reminds us that control is an illusion, that the past offers no pardons and the choices we make, in turn, make us.”
―Jessica Lakso, Wall Street Journal