Pagelines Framework: Can I Use Hooks?
Posted 30 November 2012 - 01:16 PM
just a quesion. Is it possibile to use Hooks with Pagelines Framework?
I don't see hooks reference as I see - instead - with Platform Pro.
Basically, I'd like to add this code:
<p style="text-align: justify;">Se vuoi, dimmi che cosa ne pensi nei commenti e ricordati di <a href="" target="_blank"><strong>scaricare gratuitamente il mio ebook</strong></a> per sapere tutto sul <strong>coaching</strong>, su che cos'è e come può esserti utile. Buona lettura!</p>
Per contattarmi compila il form.
At the bottom of each post on my blog and I'd like to know if the theme can do that for me, automatically.
Thanks and best regards,
Posted 30 November 2012 - 01:27 PM
Of course PageLines Framework uses hooks all over the place.
Full list is here:
You can use the wordpress add_action() functionto add you code to any of those hooks.
Or there is a plugin to help you.
Posted 30 November 2012 - 01:32 PM
yeah you can use hooks with PageLines Framework.
There are a few things you need to know before hand.
1. YOu will need to use either the Base child theme or the PageLines Customisation plugin both available for free via the store.
2. Add you hooks to the functions.php file that comes with both the child theme and the customisation plugin.
Here is a list of the available hooks -
We also have a plugin called Action map, also free via the store and this displays all hooks available on the page -
Posted 30 November 2012 - 01:57 PM
Hi, thank you.
I downloaded the plugin, activated it, then I went via FTP to the file function.php inside the plugin folder.
Ad the bottom of the file I added:
Posted 30 November 2012 - 03:48 PM
You have not 'closed' your comments should be:
/* Aggiungo una funzione per pubblicare un pezzo di testo e il form per contattarmi dopo ogni articolo */
Posted 30 November 2012 - 04:38 PM
Now it works and I really thank you.
I had to use:
<?php echo do_shortcode("[easy_contact_forms fid=3]"); ?>
in order to include the shortcode. Thank you!
Posted 30 November 2012 - 04:44 PM
I still have a question.
How could I load this code ONLY on posts? Because now it's loaded for posts AND pages. I don't want to load the code on pages, only post. Should I change the hook, I guess.
Posted 30 November 2012 - 04:51 PM Best Answer
No you need to learn about wordpress conditionals
Posted 30 November 2012 - 04:55 PM
I use the function is_single()
It it's true, there's a post