Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   [SOLVED] Removing sidebar & title on static page? (http://forum.bytesforall.com/showthread.php?t=18564)

EhsanMomeni Oct 4, 2012 12:15 PM

[SOLVED] Removing sidebar & title on static page?

I'm losing my hair overhere! On my blog/website http://www.momeni.se I have static page, but I do not want the title and sidebar to appear.

On all the othere pages, I just changed the Virtual Template to "Image" and the sidebar was gone, but I can't do it on my landing page (the static page).

Please help me - I'm going crazy :confused:

juggledad Oct 4, 2012 03:10 PM

you will need to be a little more detailed as to what you did
what template(s) did you change?
what is the change you made?
have you read about the Wordpress Template Hierarchy? (there is a link on the 'About Main Templates page)

EhsanMomeni Oct 4, 2012 03:35 PM


In the image.php (maintemplat-image) I deleted the code that had to do with the Title and Date

PHP Code:

<h1><?php the_title(); ?></h1>
        <?php the_time'j M Y' ); ?> | 
        <a href="<?php bfa_parent_permalink(); ?>"><?php bfa_parent_title(); ?></a> | 
        <?php bfa_image_size(); ?>

so on all my other pages "Bilder", "Media", "Movie", "Om Mig", "Gästbok" and "The Shop", the page title and date is gone, as well as the sidebar - just as I want it to be.

All the above named pages have the edited version of the virtual template "image" - and it works perfect.

But my landing page (i.e. static page, named "Start") has the same virtual template as the other pages (image) - but still it shows title of the page and the sidebar.

What I want is a blank static page, so that I can have a full sized slider. Is that possible?

juggledad Oct 4, 2012 07:42 PM

do you understand the Wordpress Template hierarchy? You should read the codex about it. there is a link to in in the theme options, it might give you a clue to why this is happening.

After you read it if you have some questions let me know and I'll try to guide you to the answer.

EhsanMomeni Oct 5, 2012 12:38 AM

I read it, and think I get the idea of wp template hierarchy.

I created a custom main template based on the index.php, and called it blanc.php where I deleted the part about sidebar.

PHP Code:

<div id="widgetarea-one" class="col4">
        <?php dynamic_sidebar'Widget Area ONE' ); ?>

Then I went to the page I created as my landing page (home) and selected the virtual template "blanc".

When I go to my page, the landing page still shows the sidebars, which is strange, because then I removed the same code from index.php, it removed all sidbars, both on the landing page, and on my blogpost page.

I really don't know how to remove the title and sidebars from just the landing page.

EhsanMomeni Oct 5, 2012 06:35 AM

This is how my blanc.php looks - but it still doesn't work :confused:

PHP Code:

<?php get_header(); ?>

<div id="main" class="row">
    <div id="content" class="col12">
        <div id="post-3630" class="post-3630 page type-page status-publish hentry cf">
            <?php edit_post_link__'Edit''montezuma' ) ); ?>


<?php get_footer(); ?>

juggledad Oct 5, 2012 09:14 AM

You need to call the template page-xxxxx.php or you could use front-page.php. Understanding the WordPress template hierarchy is crucial

EhsanMomeni Oct 5, 2012 10:19 AM

Oh, thank you! I just created a template called it front-page.php - and woops it work perfectly! Thank you so much for you help and advice. :)

I'm gonna read the template hierarchy once a again and try too understand it. I'm guessing that it's going too be useful in the future :)

All times are GMT -6. The time now is 11:15 AM.

Powered by vBulletin® Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.