thomaspark / snowball

A WordPress plugin for making immersive longform articles
https://snowball.openhtml.org/
GNU General Public License v2.0
90 stars 24 forks source link

Modified conditions for snowball head code #218

Closed noelforte closed 8 years ago

noelforte commented 8 years ago

Added check for home and front pages so custom head code is not injected there, in the event that the most recently published post was of the snowball type.

thomaspark commented 8 years ago

Nice catch. However, someone might set the front page to a single post and would want the custom head code in that case. You could handle this by reusing the condition from the snowball_template function:

  $postid = get_the_id();

  if ((get_post_type($postid) == 'snowball') && (is_single($postid) || get_option('page_on_front') == $postid)) {

I'll merge the eventual fix and add it to the next release. Thanks.

noelforte commented 8 years ago

Awesome. I'll try that.

thomaspark commented 8 years ago

@noelforte, did you want to submit another pull request for this? Happy to merge yours, or add it myself.

noelforte commented 8 years ago

You can go ahead and add it.