Jump to content


Photo
Hooker

How to use pagelines shortcodes in hooker?

shortcodes

  • Please log in to reply
1 reply to this topic

#1 sgendry

sgendry

    Advanced Member

  • Members
  • 79 posts
  • Country: Country Flag

Posted 22 May 2013 - 06:50 PM

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...osts-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?


#2 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 22 May 2013 - 07:16 PM

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

 

To enable add this to wp-config.php

 

define( 'PL_HOOKS_PHP', true );







Also tagged with one or more of these keywords: Hooker, shortcodes