Skip to content

Instantly share code, notes, and snippets.

View themeix's full-sized avatar
🏆
No #1 Ghost, Jekyll Marketplace

Themeix LLC themeix

🏆
No #1 Ghost, Jekyll Marketplace
View GitHub Profile
@themeix
themeix / learndash-graphql.php
Created June 24, 2023 10:38 — forked from izzygld/learndash-graphql.php
Replace REST API with @wpgraphql with @apollographql client.
<?php
add_filter( 'register_post_type_args', function( $args, $post_type ) {
if ( 'sfwd-courses' === $post_type ) {
$args['show_in_graphql'] = true;
$args['graphql_single_name'] = 'course';
$args['graphql_plural_name'] = 'courses';
}
@themeix
themeix / http_headers_security.htaccess
Created November 10, 2021 04:36 — forked from dkvadratu/http_headers_security.htaccess
{HTACCESS} HTTP headers for security in .htaccess file
# Check your website headers here: https://www.serpworx.com/check-security-headers/ or https://gf.dev/
# This configuration works for WP, WC on LiteSpeed server. Be careful. Test site after installing. All lines are explained are in serpworx.com tester.
# More docs:
# https://www.netsparker.com/whitepaper-http-security-headers/#XFrameOptionsHTTPHeader
# https://owasp.org/www-project-secure-headers/
# https://www.keycdn.com/blog/http-security-headers
# WordPress plugin for Headers setup https://wordpress.org/plugins/http-headers/
# Main security options in .htaccess file:
<form action="https://formspree.io/your@email.com" method="POST">
<input type="text" name="your-name" placeholder="Your Name">
<input type="email" name="_replyto" placeholder="Email" class="float-right">
<textarea name='message' placeholder="Message"></textarea>
<button type="submit" class="btn-c buttonfx curtainup">Send Message</button>
<input class='btn-c buttonfx curtainup' type="submit" value="Send">
</form>
define ( 'WPLANG', 'de_DE');
@themeix
themeix / ghost_fix.scss
Created August 22, 2019 15:02
Ghost Fixing
body {
overflow-x: hidden;
}
.kg-gallery-container {
margin: 1.5em auto;
display: flex;
flex-direction: column;
max-width: 1040px;
@themeix
themeix / demo2-new.xml
Created June 13, 2019 06:49
Doxy 3.x Docs Example
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->
<!-- To import this information into a WordPress site follow these steps: -->
<!-- 1. Log in to that site as an administrator. -->
<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
<!-- 3. Install the "WordPress" importer from the list. -->
@themeix
themeix / demo2.xml
Created June 13, 2019 06:41
Chapter contents for Doxy 3.x
<wp:postmeta>
<wp:meta_key><![CDATA[__doxy_doxy_doc_chapter_0__doxy_doc_chapter]]></wp:meta_key>
<wp:meta_value><![CDATA[field_5cfa0359625c3]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key><![CDATA[_doxy_doxy_doc_chapter_0__doxy_doc_chapter]]></wp:meta_key>
<wp:meta_value><![CDATA[Chapter 1 Content Here]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key><![CDATA[_doxy_doxy_doc_chapter_1__doxy_doc_chapter]]></wp:meta_key>
@themeix
themeix / demo2.xml
Created June 13, 2019 06:39
2 Chapter Content
<wp:postmeta>
<wp:meta_key><![CDATA[_doxy_doxy_doc_chapter_0__doxy_chapter_name]]></wp:meta_key>
<wp:meta_value><![CDATA[Chapter 1 title here]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key><![CDATA[__doxy_doxy_doc_chapter_0__doxy_chapter_name]]></wp:meta_key>
<wp:meta_value><![CDATA[field_5cfa0267625c2]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key><![CDATA[_doxy_doxy_doc_chapter_1__doxy_chapter_name]]></wp:meta_key>
@themeix
themeix / demo2.xml
Created June 13, 2019 06:32
Add New postmeta for the chapter title
<wp:postmeta>
<wp:meta_key><![CDATA[_doxy_doxy_doc_chapter_0__doxy_chapter_name]]></wp:meta_key>
<wp:meta_value><![CDATA[Chapter 1 title here]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key><![CDATA[__doxy_doxy_doc_chapter_0__doxy_chapter_name]]></wp:meta_key>
<wp:meta_value><![CDATA[field_5cfa0267625c2]]></wp:meta_value>
</wp:postmeta>
@themeix
themeix / demo2.xml
Last active June 13, 2019 06:22
Add New Code
<!-- Do you want to show chapter in Doc? (Start) -->
<wp:postmeta>
<wp:meta_key><![CDATA[show_chapter_in_doc]]></wp:meta_key>
<wp:meta_value><![CDATA[yes]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key><![CDATA[_show_chapter_in_doc]]></wp:meta_key>
<wp:meta_value><![CDATA[field_5cfe6e5440f1f]]></wp:meta_value>
</wp:postmeta>
<!-- Do you want to show chapter in Doc? (End) -->