mstanford
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Remove widgets on designated posts pageCreated the file and uploaded to theme folder. Entered <?php
include (TEMPLATEPATH . “/template-onecolumn.php”);?>Result: https://lukesevern.com/photography/blog-2/
Same effect as putting that snippet into the index.php file
Forum: Fixing WordPress
In reply to: Remove widgets on designated posts pageFor some reason that code just duplicated the post!
Even though I specified that the Blog page should be the one-col template, does this code override that designation? It must be the fact that it is designated as the Posts page. What file would control that override?
Here is my index.php code:
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: https://codex.www.ads-software.com/Template_Hierarchy
*
* @package WordPress
* @subpackage Graphene
* @since Graphene 1.0
*/get_header(); ?>
<?php
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*/
get_template_part(‘loop’, ‘index’);
?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>___________
Here is the code for the one-col template:<?php
/**
* Template Name: One column, no sidebar
*
* A custom page template without sidebar.
*
* @package WordPress
* @subpackage Graphene
* @since Graphene 1.0.5
*/
get_header(); ?><?php
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-single.php and that will be used instead.
*/
get_template_part(‘loop’, ‘single’);
?><?php get_footer(); ?>
Forum: Fixing WordPress
In reply to: Remove widgets on designated posts pageWeird, I can’t see page.php in my editor. When I edited the code for index.php it definitely affected the about page’s sidebar. Any ideas for why that might be? Thank you so very much for all your help!
Forum: Fixing WordPress
In reply to: Remove widgets on designated posts pageI put that snippet in the index.php file, but unfortunately it didn’t seem to work. I don’t want to remove the widgets from other pages that rely on the index template, like ‘About.’ When I applied that code it made everything go wonky and made the footer disappear.
Forum: Fixing WordPress
In reply to: Remove widgets on designated posts pageForgive me, I am just starting to learn php. My index.php file is very simple. This a kind of a shot in the dark, but would this work?
<?php
if (is_page(“Blog”)))
{
include (TEMPLATEPATH . “/template-onecolumn.php”);
}
endif;
?>I am confused because I set my homepage to be Home, not Blog. You’re saying the blog still pulls from the index template?
Thanks for being patient, as I said I am just learning.
Forum: Fixing WordPress
In reply to: Remove widgets on designated posts pageYes I have you can check it out: https://www.lukesevern.com