Community Forums › Forums › Archived Forums › Design Tips and Tricks › Enterprise Getting Rid of WP Cycle PHP
- This topic has 3 replies, 2 voices, and was last updated 11 years, 1 month ago by David Chu.
-
AuthorPosts
-
March 11, 2013 at 1:37 pm #25491wp guyMember
I'd like to turn the Home #2 widget area for Enterprise into just a regular widget area. I assumed I could just drag a text widget there and it would work but then noticed this code in the home.php (below.)
Could anyone tell me how to safety ditch the WP Cycle code? Help appreciated.
/**
* Conditionally add Home Top #1 (home-top-1) sidebar and WP-Cycle.
*/
function enterprise_home_top_helper() {echo '<div id="home-top-bg"><div id="home-top"><div class ="wrap">';
if ( is_active_sidebar( 'home-top-1' ) ) {
echo '<div class="home-top-1">';
dynamic_sidebar( 'home-top-1' );
echo '</div><!-- end .home-top-1 -->';
}
echo '<div class="home-top-2">';
if ( function_exists( 'wp_cycle' ) )
wp_cycle();
echo '</div><!-- end .home-top-2 -->';
echo '</div><!-- end .wrap --></div><!-- end #home-top --></div><!-- end #home-top-bg -->';}
March 11, 2013 at 3:13 pm #25509David ChuParticipantHi,
Back up the file first, but I believe that if you delete the following lines, you should be all set.
if ( function_exists( ‘wp_cycle’ ) )
wp_cycle();
If the context needs it, you could also remove the 2 lines that surround this code, which would take the Cycle's container DIV out.
If all that sounds nerve-racking, at all disabling the WP-Cycle plugin should do the trick, too.
Dave
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
March 11, 2013 at 3:45 pm #25512wp guyMemberThanks for the help. I took out the wp cycle php and while it didn't break the theme, it also didn't work. Here's the link to the site: http://supplementmymedicare.com/
I still need to find a way to turn the Home Top #2 area into a regular widget area. Here's how the code for home.php reads now:
<?php
/**
* This file handles the output on the homepage.
*/add_action( 'genesis_after_header', 'enterprise_home_top_helper' );
/**
* Conditionally add Home Top #1 (home-top-1) sidebar and WP-Cycle.
*/
function enterprise_home_top_helper() {echo '<div id="home-top-bg"><div id="home-top"><div class ="wrap">';
if ( is_active_sidebar( 'home-top-1' ) ) {
echo '<div class="home-top-1">';
dynamic_sidebar( 'home-top-1' );
echo '</div><!-- end .home-top-1 -->';
}
echo '<div class="home-top-2">';echo '</div><!-- end .home-top-2 -->';
echo '</div><!-- end .wrap --></div><!-- end #home-top --></div><!-- end #home-top-bg -->';March 11, 2013 at 5:13 pm #25528David ChuParticipantYour site doesn't look anything like the Enterprise demo. It doesn't even look like you're accessing the home.php template at all, the HTML code is nothing like that template. So I'm guessing you have your site set in a way that the theme isn't expecting - take a look at the documentation that was provided with the theme. That's always the best stop for any question like this.
I don't have Enterprise, so I'll have to defer to others. But in many Genesis themes the custom home template is put to use only when you have a default WP set up - that is, set your site is set to use your latest Posts on the homepage, Doing things like choosing a static Page for Home overrides a home template for many themes. That's the best hint I can give you.
Good luck.
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.