• Resolved gmeetsgcomic

    (@gmeetsgcomic)


    I’m trying to integrate the Webcomic plug-in with my GeneratePress site and for some reason I can’t get the plug-ins shortcodes and actions to work within GP.

    For example, I’m trying to do a manual integration of the Webcomic plug-in using GP’s Hooks and Webcomic’s Integration actions.

    Overview of GP’s Hooks: https://docs.generatepress.com/article/hooks-element-overview/
    Info on Using Hooks in GP: https://docs.generatepress.com/article/using-hooks/

    I want to be able to do the integration manually and using Elements seemed like a great way to do that. So I tried using the Elements hook as follows:

    Added a New Hook
    The code I used was do_action('webcomic_integrate_landing_page');
    I set it to go in the before_main_content hook (You can see on the visual guide where that is)
    I checked the Enable Shortcodes and Enable PHP options both on
    I set location to Front Page
    I set the WC plug-in integration to Webcomic (as per this page where it says to use Webcomic for “themes modified to use Webcomic’s integration actions”)

    But all that happens is the home page displays the text do_action('webcomic_integrate_landing_page')

    It’s in the right place but no comic or navigation is generated at all.

    It kind of works with the Universal integration but I really want to integrate manually with my theme to control the location of the comics/navigation with other elements on each page.

    Is there any reason why the actions aren’t being performed?

Viewing 1 replies (of 1 total)
  • Thread Starter gmeetsgcomic

    (@gmeetsgcomic)

    All I needed to do was enclose the code in PHP tags and it worked:

    <?php do_action(webcomic_integrate_landing_page);
    ?>
    • This reply was modified 5 years, 8 months ago by gmeetsgcomic.
Viewing 1 replies (of 1 total)
  • The topic ‘Integrating Webcomic with GeneratePress’ is closed to new replies.