Urban Giraffe Support | Sniplets
Struggling Creating custom placement
I'm stuck creating a custom placement for a sniplet - I've read the website but I still don't understand.
I can edit theme files if necessary.
Specifically, I want to put a notice on every page, but before the post / page details (not after the post title which the default "before post" does).
What code do I put in the template at the point where placement is required (i've tried <div id="mypoint"></div> but that doesn't work)?
Then what exactly must I put in functions.php?
Finally what exactly do I type in the Manage Options Page - custom places in Wordpress Admin (i tried post/mypoint and k2/mypoint and just mypoint etc etc)?
Please help with an example - thanks.
J Hudson
Responses
Posted 3 months ago by Key Master
Details of using placements is given in the Placements and Template Tags section. Specifically you need to add the code to functions.php so that Sniplets knows you are using placements (an example is given in the Placements section which you should modify). Then you need to add one of the template tags at the point in your theme where you want the placement to appear (e.g. <?php do_action ('the_sniplet_place', 'mytheme/yourplace'); ?>
)
Posted 3 months ago by Member
Thanks for taking the time to reply to my question. That makes a lot more sense now.
J Hudson
Reply
You must log in to post.