Search code examples
phpwordpressgenesischild-theming

Add code to StudioPress Genesis Child Theme loop


I am using the theme Magazine Pro for the Genesis Framework. I have a plugin that in order for it to be displayed I must add the following in the loop.

<?php wptopc($format="select", $prepend="<div class='toc'>", $append=""); ?>
<?php wptopc_pagination_links($prepend="", $append="</div>"); ?>

There is no single.php file or anything like that. I also don't want to change the loop entirely, just add the above code to it. How can I do this for only single_posts?


Solution

  • So I figured it out. There is a plugin from StudioPress called Genesis Simple Hooks. It allows you to execute shortcode, html and php into various hook elements in the framework.

    For my purpose I just added the php code to genesis_before_entry_content