Created
September 16, 2017 06:37
-
-
Save wpflippercode/ee4a168ead51d9c30595314e439327e8 to your computer and use it in GitHub Desktop.
Arrange position of map and listing using hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('wpgmp_map_output','wpgmp_map_output',1,3 ); | |
function wpgmp_map_output($output,$map_div,$listing_div,$map_id) { | |
// You can use $map_div and $listing_div to place them according to your need. | |
$output = "<div style='float:right'>".$map_div."</div>"; | |
$output .= "<div style='float:left'>".$listing_div."</div>"; | |
return $output; | |
} |
Is it possible to write a conditional that allows this code to work only on large and medium devices? The side by side feature is great, but not on a mobile device.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
There's an error in the code:
The number of accepted arguments has to be 4, not 3.