Jump to content
JohnB

Adding a hook to call some php

Recommended Posts

JohnB

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
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
JohnB

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
Simon

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
JohnB

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
Danny

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


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
JohnB

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
catrina

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.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
JohnB

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
Danny

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]


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
JohnB

Thanks Rockstar,

worked.

John

Share this post


Link to post
Share on other sites
mackenzie

The topic was marked as resolved.


Mackenzie - PageLines Help Desk

The Centsible Family - Writer, Photographer and Coffee Addict

---------------------------------------------------

Kindly search this forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

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


  • Similar Content

    • KathleenAspenns
      By KathleenAspenns+
      I would like to upgrade my site to PHP 7, but there is an error warning in the PL Framework theme. I should think this should be fixed asap, I cannot be the only person trying to be up to date.
      1976 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
       
    • Dan Haddock
      By Dan Haddock
      DMS: Latest Version
      Running a Child Theme
      Wordpress: 4.8.3
      Plugins:
      Akismet Anti-Spam 
      Coming Soon Page & Maintenance Mode by SeedProd
      Contact Form 7
      Cookie Law Info
      DMS Professional Tools    
      Enhanced Media Library
      Flamingo
      Google Analytics for WordPress by MonsterInsights
      Google XML Sitemap    
      Jetpack by WordPress.com
      Legull
      Loginizer   
      MailChimp for WordPress
      PageLines Updater
      Really Simple SSL
      Schema App Structured Data
      Sucuri Security - Auditing, Malware Scanner and Hardening  
      Uber reCaptcha
      Yoast SEO
      Problem Below
      Hi Team,
      I am looking to style the Continue Reading Button with the PHP you provided in an earlier ticket here: 
       
      I put the PHP code into my site, however I do not get my Icon back, I just get back Read More >>
      I have attached a screenshot of the code in place on my site along with the output.
      Interested to know what I may be doing wrong? - I am very new to PHP so a bit apprehensive on this.
      The Images: https://drive.google.com/open?id=0B0i4JJXa2jdQN2xoakZNRUdmaU0
      Let me know if you need any more information from me.
       
    • casseysdesigns
      By casseysdesigns+
      In the past I would use nextbox for this task. However, Platform 5 does not have nextbox. I will do my best to describe what I am trying to do.
      I am creating a template for coaches, each product has its own link but they all share a common coach id. I want to set up the templates with the links for each product with a variable for the coach id so that I can change the coach id for all the links on the site by just changing the value of the variable $coachId. To do this I'll need to do something like the following...
      <a href="salesite.com/productcodes/referringRepId=<?= $coachId ?>" target="_blank">Product Purchase Link</a> Is it possible to do this with Platform 5?
    • Dana
      By Dana+
      Hi DMS team,
      Please help out on how to add Post tags to the bottom of each post. Tried looking at the hooks tutorials but not sure what to do here.
      Thanks a lot.
       
       
       
       
    • jvheintze
      By jvheintze+
      I just tried to figure out how to use Lax in combination with Post Thumbnails the following way: instead of showing the Featured Image on top of the content section I would like to have a Lax section above the content which loads for each post the featured image. To do so it seems there should be some kind of word press hook support necessary (not ready yet)? Or did I miss something?
×