This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convert_reusable_block_to_regular_block($data, $postarr) { | |
// Check if it's a new custom post type | |
if ($data['post_type'] === 'your_custom_post_type' && $data['post_status'] === 'auto-draft') { | |
$reusable_block_post = get_page_by_title('your_reusable_block_name', OBJECT, 'wp_block'); | |
// Check if the reusable block exists | |
if ($reusable_block_post !== null) { | |
$reusable_block_content = $reusable_block_post->post_content; | |
// Convert the reusable block into a regular block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name WordPress topic redirect | |
// @namespace WordPress_topic_redirect | |
// @description Forces https, adds view=all to topic urls and redirects if needed. | |
// @version 1 | |
// @grant none | |
// @run-at document-start | |
// @include *://*wordpress.org/support/topic/* | |
// @include https://wordpress.org/support/plugin/* | |
// @include https://wordpress.org/support/theme/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name WordPress.org plugins topic highlighter | |
// @namespace http://clorith.net/ | |
// @version 0.1 | |
// @description Add status highlights to topics for easy overviews. | |
// @author Clorith | |
// @match https://wordpress.org/support/* | |
// @require https://code.jquery.com/jquery-1.11.0.min.js | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
get_header(); | |
$term = get_queried_object(); | |
$term_title = single_term_title(); | |
$term_description = term_description(); | |
$term_children = get_term_children( $term->term_id, $term->taxonomy ); | |
$has_children = ! is_wp_error( $term_children ) && ! empty( $term_children ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Ajustes Generales */ | |
body { | |
font-size: 12px; | |
color: #666; | |
} | |
@media screen and (min-width: 1120px) { | |
.site { | |
margin-top: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// parent theme: Benevolent | |
// author: igmoweb | |
<?php | |
get_header(); | |
$term = get_queried_object(); | |
$term_children = get_term_children( $term->term_id, $term->taxonomy ); | |
$has_children = ! is_wp_error( $term_children ) && ! empty( $term_children ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying archive pages. | |
* | |
* @link https://codex.wordpress.org/Template_Hierarchy | |
* | |
* @package Benevolent | |
*/ | |
get_header(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here is a video explaining the code https://d.pr/v/WQ6w7R | |
// We need to incluide this <meta> tag inside the <head> HTML tag: | |
// <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
// Below are the actual CSS styles that need to be added to the "more.css" stylesheet | |
/* Prevent horizontal overflow */ | |
html { | |
max-width: 100%; | |
overflow-x: hidden |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Warning: Illegal string offset 'alt' in /usr/home/josemorraja.com/web/wp-content/themes/josemorraja-v4/single.php on line 53 | |
// Warning: Illegal string offset 'id' in /usr/home/josemorraja.com/web/wp-content/themes/josemorraja-v4/single.php on line 31 | |
<?php get_template_part('parts/header'); ?> | |
<div class="container"> | |
<div class="row"> | |
NewerOlder