Hallo zusammen,
ich bin neu hier und habe leider gleich eine Frage.
Vorneweg, ich habe mich die letzten 8 Stunden durch sämtliche Foren und Websites gesucht, konnte mein Problem jedoch leider nicht lösen:-(
Nun zu meinem Problem:
Ich habe mehrere Webseiten, wie beispielsweise die forellenteich-angeln.com, welche ich alle mit der Theme "Newton" betreibe.
Diese würde ich sehr gerne beibehalten, da ich die Menüführung mit sowie die beiden Sidebars designmäßig sehr ansprechend finde.
Nun habe ich das Problem, dass ich gerne einen PHP Code (dies mache ich immer mit einem Widget) vor meinem Menü in der linken Sidebar einfügen möchte.
Da ich das als Menü das "Standart primary" Menü von Newton verwende, setzt er mir dieses immer automatisch davor.
Auch sämtliches suchen und Versuche den Code in der Function.php datei zu verändern brachten leider nicht den erhoften Erfolg.
Hier der function-code, diesen musste ich leider aufgrund der Größenbegrenzug auf 2x einfügen: Teil 1-2
<?php
/**
* Newton functions and definitions
*
* @package Newton
*/
if ( ! function_exists( 'newton_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*/
function newton_setup() {
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on Newton, use a find and replace
* to change 'newton' to the name of your theme in all the template files
*/
load_theme_textdomain( 'newton', get_template_directory() . '/languages' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link [url]http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails[/url]
*/
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 580, 9999, false );
add_image_size( 'newton-logo', 300, 300, true );
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'primary' => esc_html__( 'Primary Menu', 'newton' ),
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
) );
/*
* Enable support for Post Formats.
* See [url]http://codex.wordpress.org/Post_Formats[/url]
*/
add_theme_support( 'post-formats', array(
'quote', 'image', 'video', 'gallery'
) );
// Set up the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'newton_custom_background_args', array(
'default-color' => '303030',
'default-image' => '',
) ) );
/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width.
*/
add_editor_style( array( 'editor-style.css', 'genericons/genericons.css', newton_fonts_url() ) );
}
endif; // newton_setup
add_action( 'after_setup_theme', 'newton_setup' );
/**
* Set the content width in pixels, based on the theme's design and stylesheet.
*
* Priority 0 to make it available to lower priority callbacks.
*
* @global int $content_width
*/
function newton_content_width() {
$GLOBALS['content_width'] = apply_filters( 'newton_content_width', 580 );
}
add_action( 'after_setup_theme', 'newton_content_width', 0 );
Alles anzeigen