Skip to content

Instantly share code, notes, and snippets.

@pelmered
pelmered / composer.json
Created October 9, 2015 17:14
Example composer.json for WordPress
{
"repositories": [
{
"type": "composer",
"url": "http://wpackagist.org"
},
{
"type": "package",
"package": {
"name": "advanced-custom-fields/advanced-custom-fields-pro",
@wpmark
wpmark / cpt-archive-show-all-posts.php
Last active June 8, 2018 06:13
Pre Get Posts to Show All Posts for Custom Post Type Archive
<?php
function wpmark_alter_team_archive_template_query( $query ) {
/* only proceed on the front end */
if( is_admin() ) {
return;
}
/* only on the person post archive for the main query */
if ( $query->is_post_type_archive( 'wpmark_person' ) && $query->is_main_query() ) {
@salcode
salcode / .gitignore
Last active February 10, 2024 10:56
See https://salferrarello.com/wordpress-gitignore/ for the latest version of my WordPress .gitignore file
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@macbleser
macbleser / wp-permissions-script
Created February 21, 2014 15:37
WordPress Permissions Configuration Script
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=changeme # &lt;-- wordpress owner
WP_GROUP=changeme # &lt;-- wordpress group
WP_ROOT=/home/changeme # &lt;-- wordpress root directory