Skip to content

Instantly share code, notes, and snippets.

View gicolek's full-sized avatar

Rafał Gicgier - Certified Codeable Expert Developer gicolek

View GitHub Profile
@gicolek
gicolek / gf.css
Last active June 11, 2024 13:14
gf.css
<style type='text/css">
#gform_fields_6 {
list-style-type: none;
margin: 25px 0 0 0;
padding: 0;
display: flex;
flex-direction: column;
}
#gform_fields_6 .gfield--type-radio {
@gicolek
gicolek / slider_full_code.php
Last active May 28, 2024 14:28
slider_full_code
<?php
add_shortcode( 'wp_doin_slider', 'wp_doin_slider_func' );
/**
* @hook wp_doin_slider_func
*/
function wp_doin_slider_func( $atts, $content = null ) {
?>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
@gicolek
gicolek / slider_shortcode.php
Last active May 28, 2024 13:56
Custom WordPress Slider Shortcode
<?php
add_shortcode( 'wp_doin_slider', 'wp_doin_slider_func' );
/**
* @hook slider_test
*/
function wp_doin_slider_func( $atts, $content = null ) {
$atts = shortcode_atts(
array(
'ids' => '1,2,3,4',
@gicolek
gicolek / contact_form_7_updates.css
Last active August 26, 2024 12:50
Contact Form 7 updated CSS
.wpcf7-form label {
width: 100%;
display: flex;
padding: 10px 0;
flex-direction: column;
}
.wpcf7-form-control {
padding: 10px !important;
border-radius: 10px;
@gicolek
gicolek / contact_form_7_layout.html
Last active August 26, 2024 12:47
Contact Form 7 layout
<div class="c-custom-contact-form-7">
<div class="c-custom-contact-form-7__overlay">
✉️ <a href="mailto:[email protected]">[email protected]</a>
</div>
<h2> Contact Us </h2>
<div class="c-grid">
<label> Your name
[text* your-name] </label>
<label> Your email
@gicolek
gicolek / gf_api_entries_4.php
Created February 27, 2024 22:58
Gravity Forms API Table Marup
<?php
// Assuming $entry is already defined as in your previous code
echo '<table border="1">';
echo '<tr>';
echo '<th>ID</th>';
echo '<th>Date Created</th>';
echo '<th>Testing Field</th>';
echo '<th>Second Choice</th>';
// Add more <th> elements for additional fields as needed
@gicolek
gicolek / gf_api_entries_3.php
Created February 27, 2024 22:53
Customize GFAPI Entries
<?php
foreach ($entry as $entry_data) {
if ($entry_data[3.1] === 'First Choice') {
echo '<p>This entry has the first choice selected:</p>';
// Additional code for displaying other fields or custom formatting
}
}
@gicolek
gicolek / gf_api_entries_2.php
Created February 27, 2024 22:52
Gravity Forms entries
<?php
foreach ( $entry as $entry_data ) {
echo '<p>Testing Field: ' . $entry_data[1] . '</p>';
echo '<p>Second Choice: ' . $entry_data[2] . '</p>';
}
@gicolek
gicolek / gf_api_get_entries.php
Created February 27, 2024 22:51
GF API get entries
<?php
$form_id = '1';
$entry = GFAPI::get_entries( $form_id );
?>
@gicolek
gicolek / contact-form-two-col-layout.html
Created February 22, 2024 15:44
Contact Form 7 Two Column Layout
<div class="c-grid">
<div>
<label> Your name
[text* your-name] </label>
<label> Your email
[email* your-email] </label>
</div>
<div>