- This topic has 11 replies, 2 voices, and was last updated 9 years, 5 months ago by Tom.
-
AuthorPosts
-
May 7, 2015 at 8:59 am #106360Heath
First, thank you Tom for awesome support and helping me before with displaying header images based on post category!! Also, the add-ons are great.
I’m stumped trying to use GP Hooks with the Advanced Post Slider plugin. I read several other forum posts, and what worked for them doesn’t seem to be working for me.
So, if I use just the shortcode, it works fine! ( shortcode: [advps-slideshow optset=”1″] ) But, if I try to use the php below, it does not work. Strange.
<?php echo do_shortcode(‘[advps-slideshow optset=”1″]’); ?>
Obviously I need to solve this before I combine it with additional php “if” commands.
Thanks in advance for your continued support!
May 7, 2015 at 9:03 am #106362TomLead DeveloperLead DeveloperAre you checking the Execute PHP checkbox while using PHP?
<?php echo do_shortcode('[advps-slideshow optset="1"]'); ?>
Out of curiosity, why not just use the shortcode?
May 7, 2015 at 9:07 am #106363HeathThanks for the super quick reply!
I do have the execute box checked. I want to use php so I can add an “if” condition for home page only.
May 7, 2015 at 9:19 am #106369TomLead DeveloperLead DeveloperAnd this doesn’t work?
<?php if ( is_front_page() ) : ?> <?php echo do_shortcode('[advps-slideshow optset="1"]'); ?> <?php endif; ?>
How about this?
<?php if ( is_front_page() ) : ?> [advps-slideshow optset="1"] <?php endif; ?>
May 7, 2015 at 9:35 am #106375HeathThe second one worked! Isn’t that strange that I can’t use “do_shortcode”??
One last question, how do I add space after the slider element? I would use your element spacing add-on, but I only want the extra space to occur when the slider is present (front page).
Thanks Tom!
May 7, 2015 at 9:42 am #106377TomLead DeveloperLead DeveloperThat is strange – not sure what would cause that.
You can wrap the slider in a div which you can add spacing to:
<?php if ( is_front_page() ) : ?> <div class="slider-spacing"> [advps-slideshow optset="1"] </div> <?php endif; ?>
Then add this CSS:
.slider-spacing { margin-bottom: 20px; /* or whatever */ }
May 7, 2015 at 9:58 am #106378HeathYou’re the man. The margin spacing worked, but now I see the problem is the spacing IN the slider itself. http://www.notwrittenby.com See the thumbnails being cut? I could ask the plugin support forum.
May 7, 2015 at 10:00 am #106379TomLead DeveloperLead DeveloperWas that not happening before adding the spacing above?
May 7, 2015 at 10:02 am #106380HeathThe thumbnails were always cut off. But, I thought adding the margin spacing you helped me with would solve the problem. It only added more gray space.
May 7, 2015 at 10:05 am #106382TomLead DeveloperLead DeveloperHmm, you may have to ask them.
You can try:
#advps_container1 #bx-pager { position: relative !important; bottom: auto; }
Then you may have to adjust some more spacing etc..
May 7, 2015 at 10:24 am #106385HeathWow, that worked. I just had to adjust the bottom margin to negative px.
Thanks for your time!
May 7, 2015 at 1:53 pm #106432TomLead DeveloperLead DeveloperNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.