Jump to content


Photo
- - - - -
Resolved

Adding a hook to call some php

php hooks

This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1 JohnB

JohnB

    Member

  • Members
  • 12 posts

Posted 25 September 2012 - 09:53 PM

Hi All,


I use Slidedeck 2 and want to use some shortcode to run in a pop up window use in a lightbox style popup.

The code is <?php eco do_shortcode("[slideeck2 id=xxxx]");?>

I can not find anywhere in 2.3 to add php to be used in a hook.

How do I do that.

Also there will I am sure be other bit of php I want to use in time

one web site is www.johnnbroome.co.uk

If it is a plugin then that's fine.

Cheers


John

#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 26 September 2012 - 01:18 AM

John, a hook is to include PHP code or other code into a specific location. That looks like something you want to add in a more flexible place.

You want to use this plugin:

Please Login or Register to see this Hidden Content



It allows you the luxury of converting the PHP snippet to a shortcode which you may place anywhere your heart desires.

#3 JohnB

JohnB

    Member

  • Members
  • 12 posts

Posted 26 September 2012 - 12:12 PM

Hi Smart egg,

I should have told you more.

I am using this plugin

Please Login or Register to see this Hidden Content



With this set of instructions

Please Login or Register to see this Hidden Content



shortcodes are not use in it. So I use the WP Video Lightbox (not just for videos) to create a lightbox that pops up. In that (as far as I understand it) a shortcode can not be used.

So if there is another plugin that is a pop up and can call Slidedeck (www.slidedeck.com) shortcode then I'd love to know where.

Cheers

John

#4 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts

Posted 26 September 2012 - 02:14 PM

In a post is it? Why not use the in built modal popup?

Please Login or Register to see this Hidden Content



#5 JohnB

JohnB

    Member

  • Members
  • 12 posts

Posted 01 October 2012 - 10:56 AM

Hi Karma,


Did you know that shortcode is case sensitive!! I tried it. But

In the example I show a still image that then opens into the popup.

Here it is

Please Login or Register to see this Hidden Content



Can I replace the label "clicl me" with an image as above? And how?

I think we are close

Cheers

John

#6 Danny

Danny

    Is Awesome!

  • Moderators
  • 16563 posts

Posted 01 October 2012 - 11:40 AM

Can you provide a link to the page where the modal is active please.

#7 JohnB

JohnB

    Member

  • Members
  • 12 posts

Posted 02 October 2012 - 03:09 PM

Hi Karma,

Please Login or Register to see this Hidden Content



Also note the header is under the menu bar?

The Leave a reply should not be there. I am not asking you to do any more than you want to here. I can add those later but if you want to .....

This is a development site for use on another domain when I have it in order.

But the click me works.

Thanks,

John

#8 catrina

catrina

    Advocate

  • Members
  • 12345 posts

Posted 02 October 2012 - 04:17 PM

I'm not sure why the header is showing underneath the menu bar. Do you have any custom CSS controlling any elements on your site?

As for the Comment box, it's there because the Comments section is activated in the template for that page in Drag & Drop. It needs to be deactivated.

#9 JohnB

JohnB

    Member

  • Members
  • 12 posts

Posted 02 October 2012 - 07:36 PM

Hi All,

Thanks advocate,

This one above is a post so where is the Comments section in that

This is a copy that is a page-

Please Login or Register to see this Hidden Content


no comments section there.

This is all the css- what should I add/removed? (and why please)


body{}

body.fixed_width .section-branding .content-pad {
padding: 0px;
height: 120px;}
#header {
background: url(

Please Login or Register to see this Hidden Content

) Center top no-repeat;
}

Cheers

John

#10 Danny

Danny

    Is Awesome!

  • Moderators
  • 16563 posts

Posted 03 October 2012 - 08:13 AM

Hi John,

We seem to be going off topic here with another issue. If you have a separate issue then please in future create a new topic.

1. If you wish to open the Slidedeck slider in a lightbox, I think you will probably best install a lightbox/fancybox plugin from the Wordpress plugin repository and then follow the instructions for the plugin. I also recommend you contact the SlideDesk support for assistance to.

The PageLines/Bootstrap modal wasn't really designed to house a slider.

2. To resolve your header background image, go to PageLines > Drag and Drop and then activate the Branding section. Then replace your header code with this:


Please Login or Register to see this Hidden Content



#11 JohnB

JohnB

    Member

  • Members
  • 12 posts

Posted 03 October 2012 - 09:40 PM

Thanks Rockstar,

worked.

John

#12 mackenzie

mackenzie

    Advocate

  • Members
  • 333 posts

Posted 04 October 2012 - 01:42 AM

The topic was marked as resolved.