Jump to content


Photo
- - - - -
Open

Do Any Or All Of The Shortcodes Have A Php Counterpart?



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

#1 CliffordP

CliffordP

    Advocate

  • Members


  • 494 posts

Posted 21 October 2012 - 09:16 AM

Looking at

Please Login or Register to see this Hidden Content

, I see quite a few shortcodes that I want to use in my custom section. I'm going to use custom fields and taxonomies per post and use a page template for all of the posts of a specified CPT.

For example:

Please Login or Register to see this Hidden Content


I verified this works in WYSIWYG on a single post.
How do I setup this "content outline" in a php template (i.e. custom section on a CPT page template)?

Thank you.

#2 CliffordP

CliffordP

    Advocate

  • Members


  • 494 posts

Posted 21 October 2012 - 09:44 AM

1) I am curious just for general information if each shortcode has a php counterpart, so please answer that question still.
2) But I think using something like Post Snippets (

Please Login or Register to see this Hidden Content

) and then just calling those blocks of code within the custom section would be easier than trying to open and close php tags within a template/section. I've used the plugin before with shortcodes inside a Post Snippet, and it's worked well. However, when I have a snippet of the code above (

Please Login or Register to see this Hidden Content

) and in my custom section I call this snippet (

Please Login or Register to see this Hidden Content

), then it displays just the code in plain text, not the actual rendering of it (

Please Login or Register to see this Hidden Content

). But if I use the Post Snippets shortcode, it looks like it renders, but it really doesn't -- the first tab is shown but the other tabs aren't clickable ( short video showing my clicks:

Please Login or Register to see this Hidden Content

).

My guess is that it has to deal with the order of when each "thing" is loaded (I may be way off though).

If you have another snippet plugin that for sure is compatible, please let me know. I assume it's something within PageLines though (like maybe something I can put in functions.php to tell PageLines to load after that plugin? -- am I in dream land? lol).

Thank you.

#3 CliffordP

CliffordP

    Advocate

  • Members


  • 494 posts

Posted 21 October 2012 - 10:31 AM

(Edited after posting -- it's getting late)

#2 (above), I DID NOT resolve the issue...
using this (found in the plugin's "Help" area) doesn't work (just plain text):

Please Login or Register to see this Hidden Content

But using this just outputs nothing at all:

Please Login or Register to see this Hidden Content


Maybe php coders see the error of my ways with the "get_post_snippet" function, but then I'd say the plugin's Help section should be improved.
Regardless, it's likely not a PageLines / Plugin conflict.

Thank you.

#4 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 21 October 2012 - 03:58 PM

As you lastly point out, PHP coders need to look at your goals and assist.

#5 CliffordP

CliffordP

    Advocate

  • Members


  • 494 posts

Posted 21 October 2012 - 04:45 PM

Simon or anyone else have a reply? Thank you.

#6 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 21 October 2012 - 04:55 PM

Simon does not work Sundays, nor does he moderate the forum on a regular basis.

#7 CliffordP

CliffordP

    Advocate

  • Members


  • 494 posts

Posted 21 October 2012 - 05:45 PM

I didn't know Simon wasn't here actively. I see his comments all over. He gets around. :-) Is any dev or "half-dev" actually a moderator that could look at this?

#8 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 21 October 2012 - 09:46 PM

Half-dev? Cute! I like that.

Simon sure does get around, but even he needs a day off once in a rare while. In that, I'm jealous of him.

Some developers do answer here, but since you're really looking for a customization that is complex, it's really not going to help you to obtain assistance in a forum. As I've pointed out elsewhere, if things aren't done right, it's quite easy to crash your entire site. Isn't it worth the investment to hire a pro and make sure you don't end up with a white screen or an error?

They're not too expensive, and worth the effort to get a few quotes.

#9 CliffordP

CliffordP

    Advocate

  • Members


  • 494 posts

Posted 21 October 2012 - 09:59 PM

this seems to say not to do that
DO NOT mass email the Pros. Don't ask them to bid out on work either.

#10 Jenny

Jenny

    Advocate

  • Unicorn Store Dev

  • 2924 posts

Posted 30 October 2012 - 04:42 PM

Some advice given to me to pass on..

You would need to enque the javascript used by the accordion section (if that's what you want to implement), but it would be easier for you to just copy the entire mark-up for the accordion and use it in your CPT instead of using shortcodes.

Hope that helps!