Enhance WP-theme Autofocus+

 

This info is dep­re­cated, since AF+ now does not rely on The­matic anymore.

… and comes with a sam­ple child-theme of its own, which I highly rec­om­mend to use!!

The updated HowTo is here. Yes, it is still nec­es­sary!

As you can see on the front­page, I am using aut­o­fo­cus+ Pro for this blog. I got it today and started to add some con­tent and pimp it to my lik­ings. And I stum­bled into a lit­tle prob­lem that seems hard to solve but actu­ally isn’t.

The theme has a cou­ple of options. One of them is that you can define a tem­plate for a blog page. But: You can only pick just one cat­e­gory that is used for this spe­cial page. If you want to use the blog-template for another page which only holds arti­cles with a dif­fer­ent cat­e­gory — in my case the KnowHow-page — you are stuck.

So what to do?

You could ask the author of the theme for help. Pro or not Pro-version (paid or not paid), he will point you to — yes, right — google, in order to find solu­tions for cre­at­ing your own tem­plates. You can do that of course — or read on…

Yeah ‚theres tons of expla­na­tions for that.Try googling it.

— Allan Cole

I solved the prob­lem myself the fol­low­ing way.

I copied the blog-template.php from the theme. Best is to down­load it with a ftp-client (I use the client inte­grated in Total­com­man­der). Then rename the file to a mean­ing­ful name. For exam­ple, if the page you are going to use it for, is called “Design”, name it design-template.php.

Edit the renamed file with an edi­tor of your choice (I rec­om­mend notepad++) and change the name of the tem­plate in line 3 to Design Tem­plate (or what­ever you want it to be).

!! If you miss this step, the tem­plate will never appear in the dropdown-menu on the right when you edit/create a page.

Look for a line that looks like this

$af_blog_catid = get_cat_ID($af_blog_cat);

and change it to

$af_blog_catid = 19;

!! whereas 19 is the ID of the cat­e­gory I use for the given page. For you the num­ber may dif­fer! This means you have to cre­ate this cat­e­gory first. You can see the ID (the num­ber) in the bot­tom left cor­ner of your browser, when you hover over the cat­e­gory in the category-menu (this is use­ful for many purposes!).

Upload the new tem­plate to the theme-directory on your webspace.

Then you cre­ate the new page called Design (or what­ever) and attach the appro­pri­ate tem­plate (e.g. design-template) to it. On this page only arti­cles with the defined category-ID will appear.

Nifty ;)

And in case you want to cre­ate another page for another cat­e­gory of arti­cles sim­ply repeat the same steps (down­load, copy, rename, find out the category-ID, edit, upload, assign to new page …) and you’re done.

Oh, and this should work as well for the free ver­sion of the autofocus+-theme.

17 Comments

  1. TJ

    Hi Michael,
    The site looks fan­tas­tic. I bought the Aut­o­fo­cus+ Pro theme yes­ter­day but have no idea how to get the front page you have set up. Cur­rently I can have a col­umn of two images down the cen­ter or 3 using the port­fo­lio view. What I would ide­ally like is the layed effect you have o your photo’s going down. HOW????
    Thanks!
    TJ

    • Michael

      Hi TJ,

      I think, you sim­ply have to add some more posts with pho­tos. I didn’t do any­thing spe­cial about it. Did you fol­low the instruc­tions here?

    • Michael

      me again…

      I just noticed that after updat­ing The­matic my site looked like you described it as well. And I don’t like the new look.
      So… I just down­graded again to The­matic 0.9.6.2. This did the trick.

  2. Jason

    Hello,
    Are you aware of a way to hack this theme to allow the “post-image” on the actual post, show a flash slideshow like NextGEN at the top instead of the post-image, yet, at the same time allow the post image to stay pub­lished on the frontpage?

    ~J

    • Michael

      Hello Jason

      I’m sorry I did not reply ear­lier, but I had zero time for main­tain­ing my blogs. I’ll have a look and let you know if I find a solu­tion — or if I don’t.

      Michael

    • Michael

      So…

      I just tested a bit, and the answer is: yes, it is pos­si­ble. With­out any hack.

      As you may have seen I’m using the FIA gallery, which I can rec­om­mend anyway.

      You can have a slideshow with pho­tos from the FIA gallery on top of a post AND define a dif­fer­ent pic as post-image that appears on the frontpage.

      BUT for some rea­son this pic must not be in the FIA gallery itself, but should reside in the media-library instead. This not a prob­lem though. You can sim­ply add a post-image of your choice and you’re done.

  3. awe­some, that did the trick. yeah, i don’t know how the siz­ing was set to those val­ues, i thought it was weird myself but appar­ently it was the default as i don’t recall chang­ing them.

    any­way, thanks again, you’ve been extremely helpful.

    –nash

  4. thanks, yeah, i’ve been stum­bling around try­ing to fig­ure this out and am slowly chip­ping away.
    i’ve got the slideshow work­ing, but am won­der­ing what spe­cific skin your using. all the skins i’ve tried end up with rather small view­ers com­pared to what you have going on. is this the skin itself or a mod­i­fi­ca­tion that can be made to the plugin?

    thanks again,
    Nash

    • Michael

      I’m using Mid­night inter­na­tional which is one of two standard-skins. I just pimped some col­ors to my lik­ing.
      Did you check ALL the options of FIA­GAllery?
      Are your pho­tos too small maybe?
      I upload them all with 800px on the longest side and adjust FIA­Gallery accord­ingly.
      You seem to restrict the height of the viewer to 500px…

      But the drop­down menu looks okay now, no?

    • Michael

      I think I found the problem.

      You set the flash-gallery-size to 100% x 500px.

      It should be some­thing like 800x800.

      That should do the trick.

      cheers ;)

  5. Nash

    i’m curi­ous what you’re using for the slideshow in your port­fo­lio pages, and for that mat­ter, how you got those drop down menus to work in aut­o­fo­cus. your page is almost exactly what i want for my port­fo­lio site.

    thanks,
    Nash

    • Michael

      Hi,

      the slideshow is this one.

      It is free, fast and serves the purpose.

      As for the drop-down-menu: I did not need to change any­thing. At least I don’t remem­ber ;)
      Might be a pro-feature though.

  6. I have a ques­tion about this theme. I have it myself and I am hav­ing a really big prob­lem get­ting it so that the image doesn’t show up twice! I have no idea which one I want to keep or any­thing, I mean I think I wanna keep the one on the top, but the prob­lem is, I have no idea how to stop the bot­tom one from show­ing up! I know that the lay­out uses a photo from each post as a header, but I don’t want that to hap­pen! What do I do?

    • Michael

      Hi Ash­ley,

      where does this occur? On the front­page or in the article-view when you are edit­ing?
      I see no dou­ble photos…

      • Jens Kappe

        You have the men­tioned behav­iour as well on your site, i.e. here: http://www.grainworks.eu/wp/200/knowhow/fluxbox-is-fast-and-sexy/

        Cheers

        Jens

        • Michael

          Not really. It only looks that way, as I used the very same photo twice. Once as fea­tured image and once in the post. I actu­ally wanted to change that later, but for­got. I was fid­dling with a new lightbox-plugin that day, but had made only one scrot of my fluxbox-desk. As long as you use (at least) two dif­fer­ent pic­tures, all is fine…

Leave a Reply

Your email address will not be published.
Required fields are marked:*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>