Skip to content

Instantly share code, notes, and snippets.

@wpt00ls
wpt00ls / style.css
Last active July 26, 2022 03:36
[Divi Restrict Content] Hide authorized text section
.divi-cr-unauthorized-msg {
display:none!important;
}
@wpt00ls
wpt00ls / recipe-text-translation-internationlization.php
Last active February 21, 2023 07:48
Internationalization filter for food recipe plugin
<?php
/**
* Italian Translation string for food recipes plugin.
*
* Add this code in a child theme
*/
add_filter(
'gettext',
function (
@wpt00ls
wpt00ls / ultimate-carousel-post-type-carousel-data-hooks-for-recipe-plugin.php
Last active September 5, 2022 13:27
Hooks to change the title, content and image for 'Post Type Carousel' items from 'Ultimate Carousel For Divi' plugin. Integration of the hooks for the 'Food Recipe' plugin given below
<?php
/**
* uc_post_type_item_content - Replace the description of the 'Post Type Carousel' from
* 'Ultimate Divi Carousel' plugin.
*
* This is already implemented in the 'Food Recipes' plugin.
*
* Add this to your child theme
* You can control what text you want to display here. If you want to, for example, add preparation and total time data,
@wpt00ls
wpt00ls / ultimate-carousel-woocommerce-product-title-filter.php
Created July 17, 2021 09:55
WooCommerce Product Title Filter For Woo Product Carousel.
@wpt00ls
wpt00ls / restrict-divi-content-via-custom-filter.php
Created March 4, 2021 06:59
Divi Restrict Content Via Custom Filter
<?php
/**
* Custom filter for "Restricting Content" via divi section.
* In the divi section "Restrict" Toggle, restrict content via "Custom WordPress Filter"
* Use the name "my_custom_filter" as the name of the filter. Note: You can name the filter however you like.
* Just ensure that you use the same filter name here as well.
*
* This filter take 3 arguments
* $original_content - A text representing the original "inner" contents of the divi section. Its in shortcode format
@wpt00ls
wpt00ls / change-faq-category-order.php
Last active July 10, 2020 16:34
Change the order for the categories for the faq block in faq-manager-with-structured-data plugin. Used mainly for gutenberg block.
<?php
add_filter('wpt_faq_manager_shortcode_categories', function (
// categoryIds from shortcode . for example [5, 8, 3 ]
$categoryIds,
// page on which the faq gutenberg block, divi module or shortcode is used.
$page,
// the counter of the faq block/divi module/shortcode on the page.
$shortcode_count
) {
@wpt00ls
wpt00ls / contact-form-7-template.txt
Last active March 25, 2020 06:55
Contact Form 7 Template
[wpcf7_row]
[wpcf7_one_half][text* your-name placeholder "Name (*)"][/wpcf7_one_half]
[wpcf7_one_half][email* your-email placeholder "Email Address (*)"][/wpcf7_one_half]
[/wpcf7_row]
[wpcf7_row][wpcf7_one][textarea* your-message placeholder "Message (*)"][/wpcf7_one][/wpcf7_row]
[wpcf7_row][wpcf7_one][submit "Send"][/wpcf7_one][/wpcf7_row]
@wpt00ls
wpt00ls / replace-wp-dashboard.php
Created May 19, 2019 05:09 — forked from wpscholar/replace-wp-dashboard.php
Replace the default WordPress dashboard with a custom one
<?php
/**
* Plugin Name: Replace WordPress Dashboard
* Description: Replaces the default WordPress dashboard with a custom one.
* Author: Micah Wood
* Author URI: http://micahwood.me
* Version: 0.1
* License: GPL3
*/