Archived

This topic is now archived and is closed to further replies.

  • 0

Hooker How to use pagelines shortcodes in hooker?


Question

Posted · Report post

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

1 answer to this question

Posted · Report post

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