Jump to content
sgendry

How to use pagelines shortcodes in hooker?

Recommended Posts

sgendry

I want to show a particular text at the top of a particular category.

 

Apparently I can't directly post php tags in hooker so I am using http://wordpress.org/plugins/allow-php-in-posts-and-pages/ to work around that. It works fine.

 

In hooker however I can't directly post pagelines shortcodes as they don't get recognized.

HOWEVER if I call them via  php include then they display as intended.

 

The following example works:

 

 

[ php ]
if ( is_category( 'my-slug' ) ) {
include 'my-file.html';
} else {
  echo '';
}
[ / php ]

 

But this one doesn't:

 

 

[ php ]
[pl_blockquote cite="XYZ" pull="right"]
A great quote[/pl_blockquote]
[ / php ]

 

even though all that is in my-file.html is

 

 

[pl_blockquote cite="XYZ" pull="right"]
A great quote[/pl_blockquote]
 
 
So this makes me curious: what am I missing and how can I avoid using a php include to show pagelines shortcodes in hooker?

Share this post


Link to post
Share on other sites
Simon

PHP is supported by the plugin, but its disabled by default.

 

To enable add this to wp-config.php

 

define( 'PL_HOOKS_PHP', true );

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

    • Jason
      By Jason+
      Any chance you can add anchors to the tabs shortcode (similar to ultimate shortcode plugin)?
      Just annoying having to use that plugin rather than pagelines one
       
      <h2>Tabs anchors</h2> [su_tabs] [su_tab title="Tab 1" anchor="First"] Tab 1 content [/su_tab] [su_tab title="Tab 2" anchor="Second"] Tab 2 content [/su_tab] [su_tab title="Tab 3" anchor="Third"] Tab 3 content [/su_tab] [/su_tabs] Use next links to switch this tabs <a href="#First">Open tab 1</a> | <a href="#Second">Open tab 2</a> | <a href="#Third">Open tab 3</a>  
    • Jason
      By Jason+
      Any solution to map section not rendering inside tab shortcode.
      (Map sits inside 3rd tab so map not visible on page load)
      Also this just seems to effect the map section. Map shortcode renders fine.
      I want to use the map section for finer control over markers and locations
      Renders fine if in first page.
       
      Thanks
    • bnapoli
      By bnapoli+
      On my site www.anewbeginning.com the "toggle" function mysteriously stopped working.  I have tried all browsers, tried disabling plugins, removing all the relevant CSS but still cant understand why it isn't working.
      The toggle is placed on this page: http://anewbeginning.com/?page_id=15965 and http://anewbeginning.com/?page_id=10779 but it does not display.
      On my other Platform5 websites, that exact code works fine: see here http://4aa.d11.myftpupload.com/?page_id=123
      Code is the same. Please help, thank you!
    • micstepl
      By micstepl+
      Pagelines seems to "disallow" the (a) usage and/or (display) of shortcodes.
      Specifically I need shortcodes in "description" of "tag/catagory" in order to display images/fontawsome, before a category.
      Please can you provide a fix for me to allow. 
    • webmktco
      By webmktco+
      I'm getting the following errors when trying to add hooks:

      Here's the debug info: http://www.stackdental.com/?pldebug=1
      Core, themes, and plugins are up to date.
       
       
       
×