Skip to content

Instantly share code, notes, and snippets.

View jfeliweb's full-sized avatar
🖖
Love, Peace and Happiness

Jean Felisme jfeliweb

🖖
Love, Peace and Happiness
View GitHub Profile
@jfeliweb
jfeliweb / Readme.md
Created June 5, 2023 21:18
Example Team Member Block

Team Member Block

This was part of the Team Member Gutenberg block plugin. This plugin was to help other developer have an example to create WordPress blocks using React JS.

This is an example use only!

- First, I would log in to my Facebook Ads Manager account and navigate to the Facebook Pixel section.
- Next, I would create a new custom audience for the specific pages where I want to track pixel events.
This can be done by selecting the "Custom Audience" option from the Audiences menu, and then choosing the
"Website Traffic" option.
- In the Website Traffic section, I would select the "Add a rule" option and then specify the pages I want to
track using the "URL contains" rule. For example, if I want to track all pages in a "blog" category,
I would enter "/blog/" in the URL contains field.
- Once I have created the custom audience, I would copy the Facebook Pixel code provided by Facebook.
- In WordPress, I would navigate to the header.php file of the theme I'm using. This file is usually located
in the /wp-content/themes/your-theme-name/ directory.
@jfeliweb
jfeliweb / WP-Dark-Mode.txt
Last active March 2, 2023 14:16
Adding Dark Mode for WordPress
- Create a new style sheet that includes your dark mode styles (e.g., background color, text color, etc.)
- Use JavaScript to detect whether the user prefers a dark or light color scheme, and load the appropriate style sheet accordingly
- Use the prefers-color-scheme media query to detect the user's color preference.
@jfeliweb
jfeliweb / bootstrap-4-menu-wordpress-filters.md
Created May 17, 2022 17:43 — forked from jakebellacera/bootstrap-4-menu-wordpress-filters.md
Bootstrap 4 menus in WordPress via filters. No walker needed!

Bootstrap 4 menus in WordPress with filters

No walker needed!

This snippet allows you to create Bootstrap 4 menus without the use of a Walker. Instead, we're using filters to leverage WordPress core functionality as much as possible. Basically, all you need to do is this and you're done:

<nav class="navbar navbar-expand-lg fixed-top">
  <div class="container">
    <a class="navbar-brand" href="<?php echo home_url(); ?>">
@jfeliweb
jfeliweb / wp-config.php
Created February 27, 2021 00:08 — forked from winggundamth/wp-config.php
Wordpress Configuration to read from environment variables
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
@jfeliweb
jfeliweb / acf_in_custum_plugin.php
Last active June 23, 2021 17:44
Add ACF inside of your plugin
if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
/*found: https://support.advancedcustomfields.com/forums/topic/include-acf-to-my-plugin/*/
/** Start: Detect ACF Pro plugin. Include if not present. */
if ( !class_exists('acf') ) { // if ACF Pro plugin does not currently exist
/** Start: Customize ACF path */
add_filter('acf/settings/path', 'cysp_acf_settings_path');
function cysp_acf_settings_path( $path ) {
$path = plugin_dir_path( __FILE__ ) . 'acf/';
return $path;
}
@jfeliweb
jfeliweb / wc_register_order_status.php
Created February 25, 2020 04:03
Create New Order Status in WooCommerce
//Step 1: Register the new order status
add_action( 'init', 'pf_register_order_statuses' );
function pf_register_order_statuses() {
register_post_status( 'wc-processing-ss', array(
'label' => 'Processing - ShipStation',
'public' => true,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
'label_count' => _n_noop( 'Processing - ShipStation <span class="count">(%s)</span>', 'Processing - ShipStation <span class="count">(%s)</span>' )

Reunion Dish API

Parties

  • List all the parties in the database
    • Display all public parties
    • Pagination
    • Limit number of results
    • Search by Party name or ID
    • Filter by tags
  • Get single party
@jfeliweb
jfeliweb / Markdown-Cheatsheet.text
Created October 2, 2019 13:19
Markdown Cheatsheet based on John Gruber's original spec (http://daringfireball.net/projects/markdown/)
Markdown:
A First Level Header
====================
A Second Level Header
---------------------
Now is the time for all good men to come to
the aid of their country. This is just a