Before you ask please READ THIS

Only one page with wide size

edited September 2014 in Fame Posts: 5
Hi,
I didn't find a solution for this in the documentation. All my site has the narrow layout option activated, but I want one page ( a landing page ) to be wide, full width. How can i do this?

Comments

  • AirAir
    edited September 2014 Posts: 10,970
    Hello

    There is no such option in theme. However I will think about some special customization that will suits you needs. I will reply in few hours.

    With regards.
    Post edited by Air on
  • AirAir
    Posts: 10,970
    OK, it took me some time but I have solution for you.

    Go to fame/functions.php and at bottom of this file put such code:

    function a13_wide_frontpage(){
    global $apollo13;
    if(is_front_page()){
    $apollo13->set_option('appearance','layout_style','wide');
    }
    }

    add_action( 'wp_enqueue_scripts', 'a13_wide_frontpage' );
    It should do the trick:-)
  • Thanks, it works for the front page, but i want to display the wide layout on a specific page (- with a custom template and a custom header-), is there another "if" condition i can use? Something like "if id=xx" ... or can I put it in the custom header?
  • Found the solution "is_page()" instead of frontpage. Thanks a lot!
  • AirAir
    Posts: 10,970
    Sorry I though landing page is front page :-) But you are right, you can use is_page() function. It would look like this

    function a13_wide_frontpage(){
    global $apollo13;
    if(is_page(42)){ //ID of page as parameter
    $apollo13->set_option('appearance','layout_style','wide');
    }
    }

    add_action( 'wp_enqueue_scripts', 'a13_wide_frontpage' );
    Here is what you can use as parameter in this function http://codex.wordpress.org/Function_Reference/is_page

    With regards.
  • I'm trying to emulate this on the blame theme, unfortunately it is just making the specific page show blank.

    I used the exact code here, am I missing something?
  • I forgot to mention also, the latest theme has a file called "theme functions" but I am guessing that this is the same file that you are referencing above.
  • AirAir
    Posts: 10,970
    Hello

    Yes there is a difference in name of global variable. Use this code:

    function a13_wide_frontpage(){
    global $a13_apollo13;
    if(is_page(42)){ //ID of page as parameter
    $a13_apollo13->set_option('appearance','layout_style','wide');
    }
    }

    add_action( 'wp_enqueue_scripts', 'a13_wide_frontpage' );
    enfurno said: I forgot to mention also, the latest theme has a file called "theme functions"
    Are you making changes in Wordpress editor? Try editing on FTP to be safe if there would be any error in functions.php file - your whole site will go blank and editor will not be available ;-)

    With regards.
  • I was using the wordpress editor, I am now editing the functions.php file directly.

    That code doesn't do anything for me though. Mind you I am trying to enable full width on a page that is hosting an iframed version of another page. Though I have my iframe set up to take advantage of the full width, if it were available.
  • AirAir
    Posts: 10,970
    Is there a chance that you will show me live link so I could see what is going on?

    With regards.
  • I pm'd you, but it's breaking the entire page now..
  • Sorry, the page being broken was my fault and a cache error on my end. I've got the code within blame/functions.php. I still have the white space on either side, if you can help me fix this then I'll buy you a WEEK worth of coffees.
  • AirAir
    edited September 2014 Posts: 10,970
    You didn't PM me, you have posted on my wall which is public available :-)

    OK I have been on your site and I can say that this topic is not for you. This topic is about using narrow layout and wide in special case. You use wide layout all the time, so remove changes that you made.

    What you want is full width rows.
    To do it, go to edit your page and:
    -select Full width elements to on
    -in rows in builder set them to full width and full width content - http://apollo13.eu/docs/blame/#!/builder_editing_rows
    enfurno said: if you can help me fix this then I'll buy you a WEEK worth of coffees.
    No need for it, but do as you please:-) You can always buy another copy of theme;-) Thanks anyway for being generous.

    PS. If you are happy with this theme please don't forget to rate us on ThemeForest - it helps us a lot! Thanks!

    With regards.
    Post edited by Air on
Sign In or Register to comment.