Skip to content

Instantly share code, notes, and snippets.

View Dinamiko's full-sized avatar
💭
just coding stuff

Emili Castells Dinamiko

💭
just coding stuff
View GitHub Profile
@Dinamiko
Dinamiko / docu_doc_post_type_args.php
Last active August 29, 2015 14:13
This example changes the default slug doc to document
function custom_docu_doc_post_type_args( $docu_args ) {
$docu_args['rewrite'] = array('slug' => 'document');
return $docu_args;
}
add_filter( 'docu_doc_post_type_args', 'custom_docu_doc_post_type_args' );
@Dinamiko
Dinamiko / docu_doc_category_args.php
Last active August 29, 2015 14:13
changes default rewtrite slug to /documents/
function custom_docu_doc_category_args( $category_args ) {
$category_args['rewrite'] = array('slug' => 'documents' );
return $category_args;
}
add_filter( 'docu_doc_category_args', 'custom_docu_doc_category_args' );
@Dinamiko
Dinamiko / docu_doc_category_labels.php
Last active August 29, 2015 14:13
changes default category name and menu name in the admin
function custom_docu_doc_category_labels( $category_labels ) {
$category_labels['name'] = _x( 'My Category', 'taxonomy custom name' , 'my-text-domain' );
$category_labels['menu_name'] = __( 'My Categories', 'my-text-domain' );
return $category_labels;
}
add_filter( 'docu_doc_category_labels', 'custom_docu_doc_category_labels' );
@Dinamiko
Dinamiko / docu_doc_post_type_labels.php
Last active August 29, 2015 14:13
changes default menu_name to Documents in the admin
function custom_docu_doc_post_type_labels( $docu_labels ) {
$docu_labels['menu_name'] = __('Documents', 'my-text-domain');
return $docu_labels;
}
add_filter( 'docu_doc_post_type_labels', 'custom_docu_doc_post_type_labels' );
@Dinamiko
Dinamiko / docu_before_index_content.php
Created January 22, 2015 16:51
adds a text before content in docu-index.php template
function custom_docu_before_index_content() {
echo '<h1>Before content</h1>';
}
add_action( 'docu_before_index_content', 'custom_docu_before_index_content' );
@Dinamiko
Dinamiko / docu_after_index_content.php
Created January 22, 2015 16:53
adds a text after content in docu-index.php template
function custom_docu_after_index_content() {
echo '<h1>After content</h1>';
}
add_action( 'docu_after_index_content', 'custom_docu_after_index_content' );
@Dinamiko
Dinamiko / docu_before_sidebar_widget.php
Last active August 29, 2015 14:13
adds a text before docu sidebar widget
function custom_docu_before_sidebar_widget() {
echo '<h3>Before Docu Sidebar Widget</h3>';
}
add_action( 'docu_before_sidebar_widget', 'custom_docu_before_sidebar_widget' );
@Dinamiko
Dinamiko / ocu_after_sidebar_widget.php
Last active August 29, 2015 14:13
adds a text before docu sidebar widget
function custom_docu_after_sidebar_widget() {
echo '<h3>After Docu Sidebar Widget</h3>';
}
add_action( 'docu_after_sidebar_widget', 'custom_docu_after_sidebar_widget' );
/*
Theme Name: Twenty Fifteen Child
Theme URI: http://example.com/twenty-fifteen-child/
Description: Twenty Fifteen Child Theme
Author: John Doe
Author URI: http://example.com
Template: twentyfifteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
?>