I have my theme installed on my new site and there are no problems at all. I installed the plugin Show Current Template and there is something off…
1. On my live new site using my theme with no errors, hovering over the Show Current Template admin bar link you can see every template being loaded including template-parts.
2. In my local dev for the site mentioned in #1 directly above, the sidebar and footer show but hovering over the Show Current TEmplate link does not list ANY templates at all.
3. In the local dev that have the content I pulled down with All in One, I see 2 different things for the Show Current Template link:
– 3a) no templates listed for pages that DO have a footer and sidebar
– 3b) template files listed for single.php that do NOT have a sidebar or footer loaded and those files are not listed???
Very confusing. I took some screenshots and loaded them into my media library of one of my sites since I don’t know how else to load an image: https://everyguitarchord.com/wp-content/uploads/2021/01/problem-with-single.php_.png
NOTE: That link is not the page I need help with!
Any thoughts on why this would happen? I suspect the issue is either:
1. My free theme OceanWP with all their styles and scripts
2. Elementor page builder
3. All the info that was pulled down with All In One Migration, and therefore maybe fully populated databases.
But for the local dev that has no issues, I forget how I did it but I pulled in dummy content from a .XML link and I guess I used the plugin WordPress Importer plugin. So that populated my databases. Why does my live site or local dev with live data data cause this problem? I don’t even know how to start looking for the issue.
]]><?php
if ( wp_is_mobile() ) {
/* Display and echo mobile specific stuff here */
}
?>
I see that must enter in code but I don’t know what? Can somebody tell me what need enter in code, i ask support but dont answer me. Thanks.
]]>index.php:
<?php get_header(); ?>
<?php get_sidebar(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php get_footer(); ?>
sidebar.php:
<?php
if ( ! is_active_sidebar( 'sidebar-1' ) ) {
return;
}?>
<div id="secondary" class="widget-area" role="complementary">
<?php dynamic_sidebar( 'sidebar-1' ); ?>
</div>
functions.php:
<?php
function arphabet_widgets_init() {
register_sidebar( array(
'name' => 'sidebar-1',
'id' => 'sidebar-1',
'before_widget' => '<div>',
'after_widget' => '</div>',
'before_title' => '<h2 class="rounded">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'arphabet_widgets_init' );
?>
Any suggestions? Many thanks.
]]>I have two sidebars, left and right. Here is the code from the Left one;
<?php
/*
Template Name: sidebar.php
*/
?>
<nav id="sidebarL">
<?php wp_nav_menu('side');
?>
</nav>
This does generate a left sidebar which shows a basic WP menu, but does not allow any of the page content to show – here is a screenshot of the resulting page;
https://gyazo.com/2e9c4c6c4b75c9d5f847ffb87af95039
Then there is the right sidebar, it only generates an error, but it also contains html <div> tags, which got me scratching immediately;
https://gyazo.com/aa26a92c72e6c12d21882ce4cc303cff
Here is the code;
<?php
/*
Template Name: sidebarL.php
*/
?>
if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
<div id="primary" class="sidebar-container" role="complementary">
<div class="sidebar-inner">
<div class="widget-area">
<?php dynamic_sidebar( 'sidebar-2' ); ?>
</div><!-- .widget-area -->
</div><!-- .sidebar-inner -->
</div><!-- #tertiary -->
<?php endif; ?>
Obviously there are no sidebars running on the site now, so whatever this person was trying to do, did not work out.
I am in the process of learning coding but writing a sidebar.php from scratch is presently over my head. I did look through the style.css to see if these ids or classes were being called there. They are not.
Is this salvageable at all? The presence of the <div> tags, a closing ?> without a corresponding opening <?php, and what seems to be a misplaced ) has me worried.
I tried fixing this by changing what I saw that was wrong, but when I got rid of all the errors I still had a big blank white page.
Don’t care about the left sidebar at all, or even about having two, but do need the right one.
Any ideas/suggestions/hope would be appreciated. Just don’t want to give up, but I am for tonight!
]]>For example:
— level 1 – top page
— level 2, child 1 page of level 1
— level 3, child 2 page of child 1
In level 3 there is a requirement to show links to level 2 and 3.
Instead of manually editing the sidebar.php file, it there a plugin that would allow this sort of control so the client can manage the links themselves via the WordPress dashboard?
]]>Thank you
I am creating my first ever theme and I seam to be get a syntax error on the endif statement line. Could someone advise or help as to why its doing this?
<aside id=”side” class=”sidebar”>
</aside>
]]>How do I remove this info?
Notice: Theme without sidebar.php is deprecated since version 3.0 with no alternative available. Please include a sidebar.php template in your theme. in /customers/b/a/9/baracohomes.com/httpd.www/wp-includes/functions.php on line 3450
And I like to remove this info on the button of the page.
Archives
Categories
No categories