• 0

Projects LUD Get post ID in single view/lightbox?

Question

Posted · Report post

Hi,

 

I'm trying to make shortcodes display additional metas inside the single view (colorbox).

 

Apparently shortcodes do work, but it seems that the usual get_the_id or post->id etc don't fetch the single post ID correctly. 

 

Is there any simple way I can get the respective single post ID's, for the colorbox?

 

 

Thanks!

Share this post


Link to post
Share on other sites

2 answers to this question

  • 0

Posted · Report post

Hello.

 

Post Id can't be retrieved that way for colorbox. You can add post ID manually, it's in address bar when editing single project.

 

Full solution for this is planed to be released in a month or so.

 

regards,

bestrag

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

You can add post ID manually, it's in address bar when editing single project.

I'm developing for non-technical people, who find wp-admin quite overwhelming - had to use a very simple frontend solution.

 

 

Full solution for this is planed to be released in a month or so.

 

Ah okay, I understand.

 

I played around with your code, tried passing a 'projectID' parameter in the url and use $_GET but it didn't work (works in single project page, but not colorbox).

 

So currently I (kind of) found a workaround, installed Easy Fancybox and added "fancybox iframe" into the href class in line 270+, under the //create link to single post comment. It's the simplest solution I could think of.

 

Probably a terrible idea lol but eh it works in the meantime. Can you update this thread when your fix is finished? Thanks.

 

 

 

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