Ava Gray's Blog, page 9

December 4, 2010

How to Hack your Template

This post is of special interest to authors (or people who run an online affiliate bookstore, I suppose, but you can get widgets from Amazon for that). That said, I'm going to tell you what I did recently and how to do it yourself because I'm feeling helpful. If you already know all about coding and php and css, then you can click away because this will be boring for you.


Authors: if you're like me, you probably don't want a website that sucks up all your time. Which means you don't want to spend your days coding. You want to be writing. For that reason, I moved away from an HTML site that I had to update manually in .txt files and then move them to my directory via ftp. That took forever, and I wasn't quite good enough at it to make it time-efficient. So I switched to WordPress, which is much easier. It's easier to upload, add pages, and what-have-you. But my chief complaint is this: when I sell a new book, I need purchase links eventually. And I hate tracking down different links from different stores, pasting it all in. It's time-consuming.


Which brings me to the awesome Courtney Milan, who came up with this sweet script for PHP websites. Using this, all you have to do is paste one line of code into your website, with correct ISBN-13 (no dashes) and it automatically generates a fuckton of buy links. It's simple, lovely, and painless. Unfortunately, if you use a WordPress site, it requires some hacking to make it work.


That said, I did it. And if I can, you can. If you want to. Because I have no background in this. My degree is in English Literature with a minor in Humanities. I didn't touch a computer until I was in college, and I didn't own one until I was 25. So here we go: my how-to hack your template.


First, you need to log in to your WordPress dashboard. Once you're in there, click on plug-ins. After that new screen loads, click on Add New at the top. This will take you to a search page. Type "Executable PHP" in the box, and choose Exec-PHP. In my searches, it's number two. Click "install now." Let that run, and once it says it's done / successful, activate it. Let that process finish. Now your WordPress site is ready for that magic one line of code that will make your buy links easier. (If you don't have a version of WP that lets you auto-install plug-ins, I'm not walking you through the manual process. Update your WP!)


The next thing you need to do is add the script to your template. Don't worry. It's easy. Use my script here, as it's been optimized by Moira Rogers for WordPress. (I tested it on three different WP sites of mine, Ann, Ava & Ellen, and it slid in neatly to three different templates. I expect it will work well on any WP site.) It's similar to Courtney's with a few tweaks to make it display neatly on your WP site. Copy this now, paste it into a .txt file, save, and put it on your desktop where you can find it later.


Your next step is to click on Appearance to the left. Click on editor at the bottom of that submenu. That will bring up the stylesheet. Don't touch that unless you really know what you're doing. Instead, look to the right, and find where it says Header. Click on that. Put your cursor at the very top of the screen, above everything. It should say DOCTYPE or something like that. Hit return a few times to make some space. Open up the PHP script you downloaded earlier. Copy everything in the file, exactly as it is. Then paste it in the space you made in your header file. Then hit update file on the bottom. It should say it has saved successfully.


And that's all. Now you just need to edit your individual pages with your magic line of code. (That means copying it from here, pasting it where you want your links to go, and deleting anything you had on the page before for purchasing.) Make sure you replace my ISBN-13 for Blue Diablo, shown in the code, for your book's correct ISBN, minus the dash. Do that, and you will be golden.


That's it! And it will generate links, like so. No more updating links. No more bothersome pasting of multiple bookstore links. Yay for efficiency!

 •  0 comments  •  flag
Share on Twitter
Published on December 04, 2010 23:11

November 23, 2010

Skin Heat

Skin Heat More wild thing than man…

Zeke Noble has escaped from a secret facility; he has no idea why he was abducted, but the experiments were cruel, soul-killing, and they changed him forever. Now free, his natural affinity with animals has evolved into a dark and dangerous instinct, a curse that costs him too much of his humanity. But he has to rebuild his life, or his tormentors win. To that end, he goes looking for work and finds so much more.


Born to be wild…

Veterinarian Geneva Harper finds herself reluctantly drawn to the lean, mysterious young man to whom the wild is second nature, but she has troubles of her own. She's the black sheep in an old moneyed Southern family, and she never had any interest in learning the family business, or being the good debutante daughter.


Though Zeke's wanted Neva for as long as he can remember, their attraction can never go anywhere. They both know that for different reasons. But when a killer starts leaving behind a trail of victims, Zeke's need to protect her is as fierce as his desire to claim her as his mate. And love may be the only thing that can save them both…


There's the cover and the blurb. Here's what RT had to say:


4.5 stars. "… a gripping suspense tale wrapped in a red-hot love story… Gray is just getting better and better with this series."


Is there a point to this, you ask? Of course! I have four ARCS to give away on Black Friday. (That's the day after Thanksgiving.) There's no limit on geographic location for winners. I'll mail anywhere. Winners announced Friday. If I don't hear from you within a week, I redraw.


Here's the magic question to enter: what do you like best about the Skin series?


Winners:


Marquetta

EmmaD

Fedora

J Baxter


Email me within a week with your full name and mailing address. Email Ann. Congrats! Happy holidays, and thanks for playing.

 •  0 comments  •  flag
Share on Twitter
Published on November 23, 2010 10:03

October 22, 2010

Shady Lady art

Shady Lady


And here it is. I think it's the best Corine cover I've had yet. Yay!

 •  0 comments  •  flag
Share on Twitter
Published on October 22, 2010 12:04

October 11, 2010

The novel formerly known as Razorland

So my YA has a new cover and a new title. Are you ready?

Enclave cover


Feel free to post your thoughts below. Click on the picture to see it close up. What do you think? Does this say "big book" to you? Do you like it better than the first one? (If you don't, there's nothing I can do about it, mind you. But do speak your mind.)

 •  0 comments  •  flag
Share on Twitter
Published on October 11, 2010 09:40

Ava Gray's Blog

Ava   Gray
Ava Gray isn't a Goodreads Author (yet), but they do have a blog, so here are some recent posts imported from their feed.
Follow Ava   Gray's blog with rss.