Created
April 20, 2019 04:21
-
-
Save yeriepiscesa/64e336dc70350813703972a8374ce46a to your computer and use it in GitHub Desktop.
Code Snippet - https://solusipress.com/membuat-sendiri-services-box-responsive-pada-tema-generatepress/
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
<?php | |
add_shortcode( 'spr_services_box', 'spr_services_box_callback' ); | |
function spr_services_box_callback( $atts ) { | |
$html = ""; | |
ob_start(); | |
$txt1 = "Lorem ipsum dolor sit amet, error feugait consectetuer nec ex, te pro scripta adipisci."; | |
spr_service_box_content( 'gear', 'Theme Development', $txt1 ); | |
spr_service_box_content( 'wordpress', 'Custom Wordpress', $txt1 ); | |
spr_service_box_content( 'shopping-cart', 'e-Commerce', $txt1 ); | |
spr_service_box_content( 'rocket', 'Plugin Integration', $txt1 ); | |
$html = ob_get_contents(); | |
ob_end_clean(); | |
return $html; | |
} | |
function spr_service_box_content( $icon, $title, $content ) { ?> | |
<div class="grid-25 mobile-grid-100 tablet-grid-50 service-box"> | |
<i class="fa fa-<?php echo $icon; ?>" style="font-size:60px;"></i> | |
<h3><?php echo $title ?></h3> | |
<p><?php echo $content ?></p> | |
</div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment