helpmepleasesos
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: link errorthank you very much
Forum: Developing with WordPress
In reply to: widgets doesn’t appear in my themefunction.php
function my_sidebar() { register_sidebar( array( 'name' => __('Sidebar','sidebar'), 'id' => 'sidebar', 'before_widget' => '<div>', 'after_widget' => '</div>', 'before_title' => '<h2>', 'after_title' => '</h2>', ) ); } add_action('widgets_init','my_sidebar');
sidebar.php
<?php my_sidebar(); ?>
- This reply was modified 5 years, 7 months ago by Steven Stern (sterndata).
Forum: Developing with WordPress
In reply to: widgets doesn’t appear in my themeI rename my function in function.php
Forum: Developing with WordPress
In reply to: widgets doesn’t appear in my themeNow show this in the sidebar:
Fatal error: Uncaught Error: Call to undefined function my_sidebars() in C:\xampp\htdocs\wordpress\wp-content\themes\tema\sidebar.php:27 Stack trace: #0 C:\xampp\htdocs\wordpress\wp-includes\template.php(722): require_once() #1 C:\xampp\htdocs\wordpress\wp-includes\template.php(671): load_template(‘C:\\xampp\\htdocs…’, true) #2 C:\xampp\htdocs\wordpress\wp-includes\general-template.php(111): locate_template(Array, true) #3 C:\xampp\htdocs\wordpress\wp-content\themes\tema\front-page.php(34): get_sidebar() #4 C:\xampp\htdocs\wordpress\wp-includes\template-loader.php(78): include(‘C:\\xampp\\htdocs…’) #5 C:\xampp\htdocs\wordpress\wp-blog-header.php(19): require_once(‘C:\\xampp\\htdocs…’) #6 C:\xampp\htdocs\wordpress\index.php(17): require(‘C:\\xampp\\htdocs…’) #7 {main} thrown in C:\xampp\htdocs\wordpress\wp-content\themes\tema\sidebar.php on line 27