Skip to content

Commit

Permalink
search page asset bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
nadimtuhin committed Oct 12, 2015
1 parent 7048f81 commit 644a060
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ protected function enqueue_assets() {
}

public function compile_assets() {
if(is_search()) return;

if ( $this->shouldCompileScripts() ) {
$page_id = $this->getCurrentPageId();
$this->onepager->asset()->compileScriptsAndEnqueue( $page_id );
Expand Down
2 changes: 1 addition & 1 deletion src/Providers/WordPress/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function isOnepage( $pageId = null ) {
$pageId = $this->getCurrentPageId();
}

if(array_key_exists('s', $_GET)) return false;
if(is_search()) return false;

$isOnepage = $this->isOnepagerByTemplate( $pageId ) || $this->isOnepagerByMeta();

Expand Down
2 changes: 1 addition & 1 deletion src/WordPress/PageTemplater.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function view_project_template( $template ) {
global $post;

//if its a 404 page then return default template
if ( is_404() ) {
if ( is_404() || is_search() ) {
return $template;
}

Expand Down

0 comments on commit 644a060

Please sign in to comment.