Archived

This topic is now archived and is closed to further replies.

  • 0

Resolved Adding a hook to call some php


Question

Posted · Report post

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

Share this post


Link to post
Share on other sites

11 answers to this question

Posted · Report post

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: http://wordpress.org/extend/plugins/shortcode-exec-php/

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

Share this post


Link to post
Share on other sites

Posted · Report post

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:


#branding {
background: url(http://johnnbroome.co.uk/wp-content/uploads/2012/09/JohnBroome1.png) Center top no-repeat;
}[/CODE]

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Smart egg,

I should have told you more.

I am using this plugin

http://www.tipsandtricks-hq.com/wordpress-video-lightbox-plugin-display-videos-in-a-fancy-lightbox-overlay-2700

With this set of instructions http://www.tipsandtricks-hq.com/wp-content/uploads/docs/WP-Video-Lightbox-Plugin-Usage-Guide.pdf

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

Share this post


Link to post
Share on other sites

Posted · Report post

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


[pl_modal title="Title" type="btn" colortype="info" label="Click Me!"][slidedeck2 id=xxxx][/pl_modal]
[/CODE]

Share this post


Link to post
Share on other sites

Posted · Report post

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 http://johnnbroome.co.uk/wp-content/uploads/2012/10/Image-to-click-on-not-a-button.png

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

I think we are close

Cheers

John

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Karma,

http://johnnbroome.co.uk/plugin-sample/pagelines-modal/178/

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

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks Rockstar,

worked.

John

Share this post


Link to post
Share on other sites

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

The topic was marked as resolved.

Share this post


Link to post
Share on other sites

Posted · Report post

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- http://johnnbroome.co.uk/model-2-page-version/

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(http://johnnbroome.co.uk/wp-content/uploads/2012/09/JohnBroome1.png) Center top no-repeat;

}

Cheers

John

Share this post


Link to post
Share on other sites