Second Bar on Front Page
URL to the page in question:
-
Bill,
What would I need to do to place 2 bars on front page. We would like to add a second bar that would track the amount of shoes collected.
Thanks,
Scooter
http://redeemingsoles.org
Scooter,
I believe you could do that. Here’s how I would go about adding it. I should mention that in the interest of keeping this as simple as possible, this method uses manual updating instead of the theme options page.
- Go to the Appearance section and select edit to open up the theme editor.
- From the list of files on your right, choose home.php
- Look for this section:
<?php if(of_get_option('home_bar') == 'newsletter') { ?>
<?php get_template_part( '/includes/newsletter-bar' ); ?>
<?php } elseif(of_get_option('home_bar') == 'donation') { ?>
<?php get_template_part( '/includes/donation-bar' ); ?>
<?php } elseif(of_get_option('home_bar') == 'action') { ?>
<?php get_template_part( '/includes/action-bar' ); ?>
<?php } ?>
- Paste this right below that section above:
- You’ll need to make a few changes to the snippet above to fit your needs. Here’s what to change:
- Line 3: Change Donate Title to your name for the donation bar
- Line 7: Change the 50% to your progress in the campaign
- Line 8: Change Goal to your goal for the campaign
- Line 12: Change http://yourlink.com to the link you’d like to have for your donate button and change “Donate Button” to the label you’d like to have on your button
- Save your changes.
That should add a second donation bar to the home page for you. Once it’s started, just change line 7 for the progress as you work toward your goal.
If you run into any trouble, let me know.
Enjoy your weekend,
Bill
- The topic ‘Second Bar on Front Page’ is closed to new replies.