Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   [SOLVED] Hide left sidebar on just one custom php page that isn't in the options list (http://forum.bytesforall.com/showthread.php?t=5930)

marced Feb 18, 2010 04:23 AM

[SOLVED] Hide left sidebar on just one custom php page that isn't in the options list
 
Hi guys,

I created a search.php page to show Google Search results on my page within my Atahualpa website, all works fine.

Now I don't want to show the left sidebar on this search.php page. Although, the script is taking the variable $bfa_ata['left_col'] I guess, which is "on" because I am on the homepage then, and in Atahualpa theme options I chose to show left sidebar on homepage, so it also shows up on the search result page. I want it on the homepage, but not on the search.php page. How do I do that? It's not in the Atahualpa sidebar options because that's all standard Atahualpa pages, not my custom search.php.

Can I just change the $bfa_ata['left_col'] variable, and if so, how? How do I do all this. My php and theme knowledge only goes so far....

Your help would be very much appreciated, thanks in advance!

juggledad Feb 18, 2010 05:04 AM

did you try unchecking ATO->Style & configure SIDEBARS->LEFT sidebar: Display on:->Search Results

marced Feb 18, 2010 06:53 AM

Yes, I did, didn't work. Doesn't match it with the search.php page, because it is customized to google search I guess...

juggledad Feb 18, 2010 07:41 AM

?? odd, I just created a search page and unchecking those items worked for me. It must have to do with your code. If you send it I'll take a look.

marced Feb 18, 2010 07:50 AM

thanks for wanting to help out. Here is my code:

<?php
require('./wp-blog-header.php');
include (TEMPLATEPATH . '/functions/bfa_get_options.php');
get_header();

?>

<!-- Google CSE Search Box Begins -->

<!-- Google CSE Search Box Ends -->

<!-- Google Search Result Snippet Begins -->

<!-- Google Search Result Snippet Ends-->
<?php
get_footer();
?>

marced Feb 18, 2010 07:52 AM

Maybe it is because my search.php is in the root, not in the atahualpa theme folder??

juggledad Feb 18, 2010 08:05 AM

The theme search.php should be in the theme folder. If you put it in the root. Atahualpa will have problems resolving things like the
require('./wp-blog-header.php');
and
include (TEMPLATEPATH . '/functions/bfa_get_options.php');
they are based on the code being in the atahualpa folder.

marced Feb 18, 2010 08:13 AM

I thought so thanks. Now I am converting everything to have the search.php in the search folder. Now I have to 'write' this page as a standard page, explanation on http://aleembawany.com/2008/02/11/go...s-integration/ :

Go to Write -> Page and give the page the page the title “Search” and make sure the permalink reads /search/
At the bottom of the page select Page Template -> Search Template

Where do I 'write a page' and permalinks as explained? No ideaa?:(

juggledad Feb 18, 2010 08:15 AM

If you want that code used in Atahualpa, just move the search.php into the atahualpa folder

marced Feb 18, 2010 08:29 AM

That doesn't work. Problem is that google search form refers for the results to websiteurl.com/search.php, which refers to the root, not the search.php in the theme folder. I can change the that in the google search form to refer to atahualpa/etc, but that's not the way, besides the options still don't work.

The website mentioned refers to the writing and permalinks for a reason, do you know how this works or where i do it?

marced Feb 18, 2010 12:52 PM

Anyone?

Anyone has experience with implementing it and knows what is meant with writing the page? As mentioned on:
http://aleembawany.com/2008/02/11/go...s-integration/

I am stuck.

Thnx!

juggledad Feb 18, 2010 02:37 PM

sorry I haven't delved into the google search so I can't give you any more help on teh forum. If you want me to look deeper at this, send me a PM and I'll quote you my rates.

wheresnifty Feb 18, 2010 02:55 PM

can you create a page within wordpress and let the search go that page... that way, you can tell the sidebars which ones to exclude....
it sounds too easy for what you may be trying to do....

i would suggest adding a php for a full width page, but it only effects pages in wordpress.... (its helpful because it actually gives you an option when you create new pages to make it default or full width.)


anyways, im not sure what else could happen for now.

Does this help at all?
http://codex.wordpress.org/Creating_a_Search_Page

If you are using adsense. you can create a new search page within wordpress. One of the options for the search function in adsense is that you can tell it where to open up the search results. You will probably end up putting the code where you want the search bar to show up as well as a separate code to put on the search page that you created.

this is probably the best way to do what you are trying to do. I have done it before so i knew what you were talking about but i forgot what i did...

marced Mar 2, 2010 01:35 PM

Thanks wheresnifty!!! Sorry for net replier earlier kinda busy. But this was the solution! Wasn't aware of being able to add pages as a template by adding a template name in php.

It showed up now, created a page and selected the template, works like a charm now!!!

Great help, thanks again, also Juggledad of course!
(result at www.marced.com, under construction though so don't be too hard on me :))


All times are GMT -6. The time now is 08:17 PM.

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