Skip to content

Instantly share code, notes, and snippets.

View temsool's full-sized avatar
🏠
Working from home

Mira temsool

🏠
Working from home
View GitHub Profile
@temsool
temsool / code.php
Last active February 27, 2024 19:41
Polylang supported custom breadcrumb
<?php
// Add Shortcode
function custom_breadcrumb_shortcode() {
// Get the queried object
$page = get_queried_object();
// Initialize breadcrumb variable
$breadcrumb = '<ul class="breadcrumb">';
@temsool
temsool / preloader.svg
Created October 6, 2023 11:41
simple svg preloader
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@temsool
temsool / tempermonkey-free-twitter-verified-badge.js
Created April 24, 2023 09:29
FREE UserScript Twitter Verified Badges for Everyone!
// ==UserScript==
// @name Twitter Verified Icon by Mira
// @version 1
// @description Show a blue verified icon beside each Twitter user's name if they are a verified account.
// @author Mira
// @match *://twitter.com/*
// @grant none
// ==/UserScript==
@temsool
temsool / taxQueryElementor
Created April 17, 2023 10:01
Tax Query elementor tax_query
<?php
add_action( 'elementor/query/solutionQuery', function( $query ) {
$tremID=get_queried_object_id();
$query->set( 'posts_per_page', -1 );
$query->set( 'post_type', 'solution' );
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-load.php');
$args = array(
'numberposts' => 10,
'post_type' => 'ag_location',
'post_status' => 'publish',
'suppress_filters' => true
);
@temsool
temsool / desc.php
Created January 16, 2023 14:44 — forked from igorbenic/desc.php
How to Programmatically Change Yoast SEO Open Graph Meta | http://www.ibenic.com/programmatically-change-yoast-seo-open-graph-meta
<?php
function change_yoast_seo_og_meta() {
add_filter( 'wpseo_opengraph_desc', 'change_desc' );
}
function change_desc( $desc ) {
// This article is actually a landing page for an eBook
if( is_singular( 123 ) ) {
@temsool
temsool / yoast_seo_opengraph_change_image_size.php
Created January 16, 2023 10:15 — forked from amboutwe/yoast_seo_opengraph_change_image_size.php
Code snippet to change or remove OpenGraph output in Yoast SEO. There are multiple snippets in this code.
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Change size for Yoast SEO OpenGraph image for all content
* Credit: Yoast Development team
* Last Tested: May 19 2020 using Yoast SEO 14.1 on WordPress 5.4.1
* Accepts WordPress reserved image size names: 'thumb', 'thumbnail', 'medium', 'large', 'post-thumbnail'
* Accepts custom image size names: https://developer.wordpress.org/reference/functions/add_image_size/
*/
function fws_admin_posts_filter( $query ) {
global $pagenow;
if ( is_admin() && $pagenow == 'edit.php' && !empty($_GET['my_parent_pages'])) {
$query->query_vars['post_parent'] = $_GET['my_parent_pages'];
}
}
add_filter( 'parse_query', 'fws_admin_posts_filter' );
function admin_page_filter_parentpages() {
global $wpdb;
@temsool
temsool / code.php
Last active June 1, 2023 01:18
schema agespace
<?php
add_filter( 'wpseo_schema_webpage', 'change_schema_ref', 11, 2 );
function change_schema_ref( $piece ) {
$linkstring ='https://www.agespace.org'.$_SERVER['REQUEST_URI'];
$piece['@id']=$linkstring;
@temsool
temsool / custom-variations-select.css
Created January 5, 2023 20:10 — forked from codescribblr/custom-variations-select.css
Custom Select Box Replacements for Woocommerce Variations
.woocommerce.single-product .product .summary .variations {
width: 100%;
}
.woocommerce.single-product .product .summary .variations td {
display: block;
width: 100%;
}
.woocommerce.single-product .product .summary .variations td label {
font-family: 'Nunito', Helvetica, Arial, sans-serif;
letter-spacing: 0px;