Jump to content


Photo
Projects LUD

Get post ID in single view/lightbox?



  • Please log in to reply
2 replies to this topic

#1 mattesar

mattesar

    Member

  • Members

  • 14 posts
  • Country: Country Flag

Posted 12 August 2014 - 10:17 PM

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!



#2 bestrag

bestrag

    Super Member

  • Members

  • 245 posts
  • Country: Country Flag

Posted 15 August 2014 - 01:54 AM

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



#3 mattesar

mattesar

    Member

  • Members

  • 14 posts
  • Country: Country Flag

Posted 23 August 2014 - 05:39 AM

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.

 

 

 







Also tagged with one or more of these keywords: Projects LUD