Jump to content
Sign in to follow this  
craigd

Custom Question

Recommended Posts

craigd

Hi, I'm running a feature Page Default at the site's landing page. Is there a way to run a carousel above the features? Thanks in advance, Craig

Share this post


Link to post
Share on other sites
cmunns

You can try including the PHP code to include the carousel on the page-feature-stdpage.php ` <?php require(PRO.'/template_carousel.php');?> `

Share this post


Link to post
Share on other sites
craigd

Thanks, Putting it in page-feature-stdpage.php did nothing. Putting the code in page-feature.php made a result of images running stright down the page with no carousel. Any other ideas? Thanks as always, Craig

Share this post


Link to post
Share on other sites
Andrew

you will also need to include the initial door the carousel, look for it in your header and add a conditional for the page template you're referring to...

Share this post


Link to post
Share on other sites
craigd

Thanks :) Can you show me what the code looks like? I'm feeling like you think I can write php but I can't. Thanks

Share this post


Link to post
Share on other sites
cmunns

In the header you'll have to add a conditional that changes this line ` <?php if((is_page_template('page-carousel.php') || is_page_template('page-carousel-full.php')) && VPRO) require (CORE_INITS.'/init_carousel.php');?> ` to this ` <?php if((is_page_template('page-carousel.php') || is_page_template('page-carousel-full.php') || is_page_template('page-feature-stdpage.php')) && VPRO) require (CORE_INITS.'/init_carousel.php');?> `

Share this post


Link to post
Share on other sites
craigd

Thank you :) That did not work. in my page-feature.php Here's the code

<?php
	if(VPRO) {
	/*
		Template Name: Feature Page - Page Content
	*/
		get_header();
	                require(PRO.'/template_carousel.php');
	                require(PRO.'/template_feature.php');
			require(LIB.'/template_page.php');
		get_footer();
	
	}
	?>

Then I made the change to the header and the site went blank. Am I missing something? Thanks in advance, Craig

Share this post


Link to post
Share on other sites
cmunns

Yes, the site went blank because you're missing a tag somewhere. Can you copy here the code ...i don't need the whole header, just the area where we were editing .

Share this post


Link to post
Share on other sites
craigd

Thanks for the responding and support. I replaced the following code in the header.php

<?php if((is_page_template('page-carousel.php') || is_page_template('page-carousel-full.php')) && VPRO) require (PRO.'/init_carousel.php');?>
With this as you posted above.
<?php if((is_page_template('page-carousel.php')
	|| is_page_template('page-carousel-full.php') ||
	is_page_template('page-feature-stdpage.php')) && VPRO)
	require (CORE_INITS.'/init_carousel.php');?>

Share this post


Link to post
Share on other sites
Andrew

Hey Craig, Is it working?

Share this post


Link to post
Share on other sites
craigd

I did the above and the site went blank so no. Thanks for the support.

Share this post


Link to post
Share on other sites
craigd

I've got the blank site to show now but I still have one single row of images running down the page. They should be sitting within the carousel. Is it because I'm using page-feature.php ? I don't think so but at this point I'm just guessing. What am I missing? Thanks in advance, Craig

Share this post


Link to post
Share on other sites
Andrew

Ok, so top-level this is how it needs to work: 1. We need to include the JS/CSS for the carousel in the header, for the specific page template you're using. 2. We need to include the HTML/Images for the carousel on that page template as well. It appears you have 2 working. The blank page is usually a syntax error or incorrect path.. So try this: `<?php if((is_page_template('page-feature.php') || is_page_template('page-carousel.php') || is_page_template('page-carousel-full.php')) && VPRO) require (PRO.'/init_carousel.php');?>` haha I don't know why Adam added stdpage, if you're not using it :/

Share this post


Link to post
Share on other sites
craigd

That worked perfect. Thank you for sticking with me on this! Craig

Share this post


Link to post
Share on other sites
bryan-hadaway

So, is this issue still persisting then? Thanks, Bryan

Share this post


Link to post
Share on other sites
craigd

All is well thanks to the awesome support here.

Share this post


Link to post
Share on other sites
bryan-hadaway

Wonderful to hear. Thanks, Bryan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×