Skip to content

Instantly share code, notes, and snippets.

View dexit's full-sized avatar
🎯
Focusing

Rihards Mantejs dexit

🎯
Focusing
View GitHub Profile
@dexit
dexit / SEO.md
Created July 2, 2025 15:01 — forked from denzildoyle/SEO.md
I short list of SEO tips and tricks I have learned over time

SEO

In this list, I will be typically be talking SEO as it relates to Google because Google will likely account for the vast majority of your inbound search traffic. Additionally, if you rank highly on Google, you will probably do well on other search engines anyway. Just like in football if you could play in the Major league you would most likely kill it in the minor league I would begin by explaining why SEO is important talk a little bit about what SEO is about and talk about how those concepts relate to the world wide web. Then talk about some of the things you could do to optimize your site from top to bottom of a typical webpage.

Why it's important

  • When you want to hide something on google put it on the second page. #SEO @searchdecoder
  • Winner takes almost everything
  • More than 80 percent of shoppers research big purchases online first
  • Opertunity for business
  • 88% Of Consumers Trust Online Reviews As Much As Personal Recommendations
  • 72% Of Consumers Say That Positive Reviews Make Them T
<?php
/**
* Render the schema graph for the acf/gb-faq block.
*
* @param array $graph Schema data for the current page.
* @param WP_Block_Parser_Block $block The block data array.
* @param Meta_Tags_Context $context A value object with context variables.
*
* @return array Our Schema graph.
*/
@dexit
dexit / wp-inspector-enhanced.php
Created July 2, 2025 13:10 — forked from brandonjp/wp-inspector-enhanced.php
WordPress Post Inspector [SnipSnip.pro] - displays post metadata, SEO information, and WordPress data in a floating panel with admin controls and configuration options. - https://snipsnip.pro/s/884
<?php
/**
* Title: Enhanced WordPress Post Inspector with Admin Controls [SnipSnip.pro]
* Description: A comprehensive debugging tool that displays post metadata, SEO information, and WordPress data in a floating panel. Features configurable position, admin settings, light/dark themes, enhanced data extraction, and security controls for developers.
* Version: 3.2.1
* Author: Brandon Pfeiffer
* Last Updated: 2025-07-01
* Blog URL: https://snipsnip.pro/s/884
* Gist URL: https://gist.github.com/brandonjp/025592669bce65f7031a00f8b04d5c97
* Code Snippets Cloud: https://codesnippets.cloud/snippet/brandonjp/WordPress-Post-541
@dexit
dexit / replacevar-script.js
Created July 2, 2025 12:42 — forked from erikyo/replacevar-script.js
Adds to Yoast an additional replacement variable both in frontend and snippet preview (backend)
/* inspired from https://github.com/Yoast/wpseo-woocommerce/blob/trunk/js/src/yoastseo-woo-replacevars.js */
/* global jQuery, YoastSEO, app, globals YoastACFAnalysisConfig */
var pluginName = "additionalVariablePlugin";
var ReplaceVar = window.YoastReplaceVarPlugin && window.YoastReplaceVarPlugin.ReplaceVar;
var placeholders = {};
var modifiableFields = [
"content",
"title",
<?php
$featured_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'img_post' );
// img_post is name of my thumbnail size ( I've added my own in functions.php )
$focuskw = get_post_meta(get_the_ID(), ‘_yoast_wpseo_focuskw’, true);
// It's focus keyword that you enter in Yoast Metabox in post edit page, it's really important
$primary_cat = get_post_meta(get_the_ID(), ‘_yoast_wpseo_primary_category’, true);
// Primary Category is important, for permalink format and meta keywords
if($primary_cat == NULL && $primary_cat == ''){
@dexit
dexit / wordpress.php
Created July 1, 2025 18:00 — forked from amorkovin/wordpress.php
Разное по WordPress
<?php
//Получить ID автора поста
$post_author_id = get_post_field( 'post_author', $post_id );
//Или
$post_author_id = get_the_author_ID();
//Получение ID автора поста на странице архива автора
if ( is_author() ) {
$author_id = get_query_var( 'author' );
}
@dexit
dexit / functions.php
Created June 12, 2025 12:37 — forked from harisenbon/functions.php
Elementor Empty Dynamic Field Condition
/**
* Load our override of dynamic-tags-condition
*/
add_action( 'elementor/display_conditions/register', function( $conditions_manager ) {
require_once(get_template_directory() . '/inc/elementor/seg-dynamic-tags-condition.php' );
$conditions_manager->register_condition_instance( new \Seg_Dynamic_Tags_Condition() );
} );
@dexit
dexit / twilio-validation.js
Created June 12, 2025 10:02 — forked from kylemclaren/twilio-validation.js
Twilio CF Worker request validation
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
});
/* WARNING:
Anything starting with REPLACEABLE_SECRET_VDB12_ shouldn't be renamed,
because they are used in deployment transformations.
Do not remove the comment below,
it is required to timestamp workers on upload.
Sent from npm.
<?php
/*
Plugin Name: Rad Webhook Demo
Plugin URI: <https://vrhermit.com/?p=4154>
Description: Adds custom WP JSON endpoints that use the FileMaker OData API to submit form data to FileMaker.
Version: 1.0
Author: radicalappdev
Author URI: <https://radicalappdev.com/>
*/
<?php
add_action( 'rest_api_init', 'custom_routes_webhook_0277');
function custom_routes_webhook_0277(){
//(exemplo: /wp-json/exemplo/notificacoes)
register_rest_route(
'exemplo', '/notificacoes/', array(
'methods' => 'POST',