• I would like this giveaway page to display inside my site as a normal page would. I have tried the use header and footer options but that still omits all the other non content widget positions and leaves most of my sites content missing.
    is there a modification that could be made to the PHP template to allow this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter jhebbel

    (@jhebbel)

    You guys didn’t even use the standard WP hooks making it impossible for me to override the template from my theme.

    Plugin Author Igor Benic

    (@ibenic)

    Hi @jhebbel, there is no standard WP hook for that. It is a mechanism each plugin, that allows that, needs to provide it.

    I have not yet written that mechanism.

    I do have other hooks which can be used to change a template:

    https://plugins.trac.wordpress.org/browser/giveasap/trunk/includes/abstracts/class-sg-giveaway.php#L276

    https://plugins.trac.wordpress.org/browser/giveasap/trunk/includes/abstracts/class-sg-giveaway.php#L287

    Thread Starter jhebbel

    (@jhebbel)

    Sure there is, you should be outputting this as page content, hooking the slug and replacing the the_content() output. That’s how other plugins are able to generate output that doesn’t require a bunch of customization to make it match a theme, and even if they do require additional changes they should be able to be done through theme overrides which I cannot do either, I have to edit your php directly and do so each time you release an update.

    Plugin Author Igor Benic

    (@ibenic)

    Hi @jhebbel, this plugin was not intended to be used in that way at the beginning. It was intended to be used as a separate page, without any scripts or styles from other plugins/themes so the load can be much faster.

    The filter the_content could be used of course, but it would retain the whole layout of the main content and since this giveaway has a different layout there might be a lot of conflicts (for example: the theme layout has borders and the giveaway layout also has them, the premium templates have images placed aside of the content and all that would look too squeezed inside of a boxed layout). That’s the reason this was not considered into using.

    I’ll try to implement the theme mechanism.

    Thread Starter jhebbel

    (@jhebbel)

    The main reason I wanted to use this plugin and start giveaways was in support of boosting traffic to my site and to have users navigate and make use of it beyond the giveaway page, and to do that I wanted the giveaway page to integrate as a seamless part of the site making user click through more likely.

    I understand the design choices for doing giveaways just for the sake of doing giveaways, but from a standpoint of using this to help generate traffic, integration options would help greatly.

    I was able to “hack” my site in for the most part by editing the giveasap_tamplate.php, but since there are no override capabilities, I had to edit your plugin directly which means my changes will be lost on plugin update.

    Plugin Author Igor Benic

    (@ibenic)

    Hi @jhebbel, you can put your changed file giveasap_template.php inside of a folder /giveaways/ in your theme.

    The next update will pull that file first.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Use full theme, not just header and footer’ is closed to new replies.