So was in der Richtung hab ich schon mehrmals ausprobiert. Hilft jedoch nichts.
Hier ist mal meine function.php mit deinem Code. Vielleicht findest du ja da den Fehler.
ZitatAlles anzeigen
<?php
/**
/**
* Define Constants
*/
define( 'WPEX_JS_DIR', get_template_directory_uri().'/js' );
define( 'WPEX_CSS_DIR', get_template_directory_uri().'/css' );
if ( !function_exists( 'of_get_option' ) ) {
function of_get_option($name, $default = false) {
$optionsframework_settings = get_option('optionsframework');
// Gets the unique option id
$option_name = $optionsframework_settings['id'];
if ( get_option($option_name) ) {
$options = get_option($option_name);
}
if ( isset($options[$name]) ) {
return $options[$name];
} else {
return $default;
}
}
}// Shortcodes in der Kurzfassung entfernen
function custom_excerpt($text = '') {
$raw_excerpt = $text;
if ( '' == $text ) {
$text = get_the_content('');
// $text = strip_shortcodes( $text );
$text = do_shortcode( $text );
$text = apply_filters('the_content', $text);
$text = str_replace(']]>', ']]>', $text);
$excerpt_length = apply_filters('excerpt_length', 55);
$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
}
return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
}
remove_filter( 'get_the_excerpt', 'wp_trim_excerpt' );
add_filter( 'get_the_excerpt', 'custom_excerpt' );/**
* Get functions
* @since 1.0
*/// TGM Plugin Activation => https://github.com/thomasgriffin/TGM-Plugin-Activation
require_once ( get_template_directory() .'/functions/recommend-plugins.php' );// Add basic hooks
require_once ( get_template_directory() .'/functions/hooks.php' );// Load CSS and JS
require_once( get_template_directory() .'/functions/scripts.php' );// Setup some useful functions
require_once( get_template_directory() .'/functions/pagination.php' );
require_once( get_template_directory() .'/functions/img_resizer.php' );
require_once( get_template_directory() .'/functions/img_defaults.php' );
require_once( get_template_directory() .'/functions/wpex_comments_output.php' );/**
* Theme Setup
*/
//Localization support
load_theme_textdomain( 'wpex', get_template_directory() .'/lang' );function wpex_setup() {
//default width of primary content area
$content_width = 920;
//theme support
add_theme_support('automatic-feed-links');
add_theme_support('custom-background');
add_theme_support('post-thumbnails');
//register navigation menus
if ( ! function_exists ( 'wpex_register_nav_menus' ) ) {
function wpex_register_nav_menus ( ) {
$wpex_menus = array(
'main_menu' => __( 'Main', 'wpex' )
);
$wpex_menus = apply_filters ( 'wpex_nav_menus', $wpex_menus );
register_nav_menus ( $wpex_menus );
}
}
wpex_register_nav_menus();}
add_action( 'after_setup_theme', 'wpex_setup' );
/**
* Replace Soliloquy affilate
* @since 1.0
*/
add_filter( 'tgmsp_affiliate_url', 'test_affiliate_url' );
function test_affiliate_url() {
return 'http://www.wpexplorer.com/soliloquy-wordpress-plugin';
}
/**
* Change default read more style
* @since 1.0
*/
if ( !function_exists( 'wpex_new_excerpt_more' ) ) :
function wpex_new_excerpt_more($more) {
global $post;
return '...';
}
add_filter('excerpt_more', 'wpex_new_excerpt_more');
endif;
/**
* Add home page option to WordPress Menu
* @since 1.0
*/
add_filter( 'wp_page_menu_args', 'home_page_menu_args' );
function home_page_menu_args( $args ) {
$args['show_home'] = true;
return $args;
}
function remove_shortcode_from_index($content) {
if ( is_home() ) {
$content = strip_shortcodes( $content );
}
return $content;
}
add_filter('the_content', 'remove_shortcode_from_index');
/**
* Define Social Options For This Theme
* @since 1.0
*/
function wpex_get_social() {
//define array of icons
$social_icons = array(
'addThis' => 'addThis',
'behance' => 'behance',
'blogger' => 'blogger',
'delicious' => 'delicious',
'deviantart' => 'deviantart',
'digg' => 'digg',
'dopplr' => 'dopplr',
'dribbble' => 'dribbble',
'evernote' => 'evernote',
'facebook' => 'facebook',
'flickr' => 'flickr',
'forrst' => 'forrst',
'gitHub' => 'gitHub',
'google' => 'google',
'grooveshark' => 'grooveshark',
'instagram' => 'instagram',
'lastfm' => 'lastfm',
'linkedin' => 'linkedin',
'myspace' => 'myspace',
'pinterest' => 'pinterest',
'paypal' => 'paypal',
'picasa' => 'picasa',
'pinterest' => 'pinterest',
'posterous' => 'posterous',
'reddit' => 'reddit',
'sharethis' => 'sharethis',
'skype' => 'skype',
'soundcloud' => 'soundcloud',
'spotify' => 'spotify',
'stumbleupon' => 'stumbleupon',
'tumblr' => 'tumblr',
'twitter' => 'twitter',
'viddler' => 'viddler',
'vimeo' => 'vimeo',
'virb' => 'virb',
'windows' => 'windows',
'wordPress' => 'wordPress',
'youtube' => 'youtube',
'zerply' => 'zerply',
'rss' => 'rss',
'mail' => 'mail' );
//return array
return apply_filters('wpex_get_social', $social_icons);
}
?>