Skip to content

Instantly share code, notes, and snippets.

Avatar

David Wögerer blickwert

View GitHub Profile
View ACF functionality.php
/* ADD ACF optionspage*/
if( function_exists('acf_add_options_sub_page') ) {
acf_add_options_sub_page(array(
'title' => '[Custom title]',
'parent' => '[edit.php?post_type=myposttype]',
));
acf_add_options_sub_page('[mypagename]');
acf_add_options_page();
}
View Remove Dashboard_widgets.php
add_action('wp_dashboard_setup', 'remove_dashboard_widgets');
function remove_dashboard_widgets(){
global $wp_meta_boxes;
// unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
// unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
// unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
// unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
// unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
// unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
// unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
@blickwert
blickwert / Default gallery link.php
Last active Aug 29, 2015
Wordpress Post settings
View Default gallery link.php
@blickwert
blickwert / woocommerce-sidebar.php
Created Mar 25, 2015
set custom Sidebar for Woocommerce in Genesis
View woocommerce-sidebar.php
/**
*
* set sidebar for woocommerce
* @author David Wögerer
* @since 2.1.2
*
*/
add_action('get_header','dato_change_genesis_sidebar');
function dato_change_genesis_sidebar() {
if ( is_woocommerce() || is_product() ) {
@blickwert
blickwert / gist:ad01af4c2e664d2bd121
Last active Aug 29, 2015
Genesis - ACF Field on Front_page (Before Content)
View gist:ad01af4c2e664d2bd121
<?php /**
* Genesis Before Content
*
* @author David Wögerer
* @since 2.1.2
*
*/
add_action( 'genesis_before_content', 'widget_before_content' );
function widget_before_content() {
View menu-primary.php
<?php
/////////////////////////////////////
// Primary Wordpress navigation
////////////////////////////////////
?>
<ul>
<?php