Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   replace the header image with a custom banner (http://forum.bytesforall.com/showthread.php?t=19543)

LGL Feb 2, 2013 10:07 PM

replace the header image with a custom banner
 
I would like to add a custom banner rotator to Atahualpa. A few versions back I knew how to do this, but things have changed and I'm stuck. Here is my code:
<?php echo do_shortcode("[all_in_one_bannerWithPlaylist settings_id='1']"); ?>
I read the posts on inserting a widget, but then I have to add another plugin, which I would rather not do. I would like to add that little piece of code to the appropriate php file, but cannot seem to find the proper place. I did get it to work, but it looks pretty crappy, so I know I didn't do it right - It's off center and will only ride above the menu. Please tell me how to edit the php correctly.

juggledad Feb 3, 2013 04:18 AM

you are right that that code no longer works due to WordPress theme requirements. If you want to edit the theme code - which I don't recommend you do since you will have to make the change each time you do an update (how good are you at documenting what you do? I tend to forget:o) you will need to look at bfa_header_config.php and you could possibly replace the code that processes the '%image' option with your code - you would have to make sure to put the '%image' in the header options

or you could add a new widget area, add a a php aware plugin, add the plugin and put your code there. Then you won't have to worry about it during future upgrades.

mcphoto Feb 7, 2013 08:49 AM

I know it's best-practices to not edit header.php, but it's often a really efficient way to get the most out of the theme.

You really do need to keep a change-log in your job folder and update it.

For some real design power, I often edit index files for making custom post pages (say, to let clients use CMS for a news page and an events page - I have way more success with editing the pages than using plugins). If you want a block of static content above your posts, making a template page is awesome (and I know zero php, but it's easy to guess & test where to paste). If you have a fixed-width page but you want a full-width banner strip across the top ("limited time offer! Like us on facebook!") That's a good place. Always see if you can use the HTML inserts>body top first - but for things like slideshows that replace the APA header image on different pages or things requiring php (like a signup form in the header area) you'll find there's times when editing header.php is really quick and easy.

I keep overall text files of APA tricks and wordpress code snippets, and in my job folders I keep logs of changed theme files, with "before and after" text - and it's a good idea to keep untouched (or latest-functioning edited) copies of those files. If you're charging people, you should really keep your records handy.

Between the power of ATA Theme Options and some occasional file edits, you can do amazing things with this theme. And it loads so freaking fast, even with a massive CSS inserts file. I haven't used HTML for a site in over a year - every single thing I do starts with ATA.


All times are GMT -6. The time now is 09:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.