• Resolved batta2711

    (@batta2711)


    Hi, Apologies I am very new to all this.

    I have installed your plugin and it works great, thanks.

    I have a theme that has a right sidebar but there is an option of full width layout for regular posts when I don’t need a sidebar. However, as the album pages are not exactly regular posts I do not get the option for full width layout.

    Can you help instruct me with a way of removing the sidebar so I can have full page width for my album pages please?

    Thanks in advance

    Bill

    p.s. here is the link to an example page:
    https://www.missbliss.co/albums/new-products/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author TV productions

    (@tv-productions)

    I don’t know exact what files your theme has, but look in your theme directory for the file single.php.
    Open it in a text editor and save it as single-easy-photo-album.php (in the same directory as the original file).

    Look in single-easy-photo-album.php for a line of code like this:

    <?php
    get_sidebar();
    ?>

    Remove that line and if I’m right, you will see the sidebar on normal post pages but not on the album pages.

    NOTE: it could be that the file you’ve just created will be deleted by an update of your theme, so check if it still exists after an update.

    Thread Starter batta2711

    (@batta2711)

    Hi,

    This is the only line in my single.php that references a sidebar.

    <?php if(get_post_meta($post->ID, ‘ace_wide’, true)) {} else { echo get_sidebar(); } ?>

    I removed it and created the single-easy-photo-album.php file but it did not seem to work.

    I saved that file in the main directory of my theme where the single.php is, was that right?

    Thanks in advance

    Plugin Author TV productions

    (@tv-productions)

    What you’ve done should work. According to the WordPress theme documentation, the file single-easy-photo-album.php should be used instead of single.php.

    Your theme is a pro theme so why don’t you ask the theme developer what you have to do?

    I hope you will solve this problem.

    Plugin Author TV productions

    (@tv-productions)

    I have found the problem!

    You have to edit again single-easy-photo-album.php. Search for the line

    <section class="section" role="main">

    and replace it with

    <section class="section-wide" role="main">

    Save the file and now it should work.

    An explanation
    The file single-easy-photo-album.php was used by the theme, but only removing the sidebar wasn’t enough. You have also to change the class of the section tag from section to section-wide.

    Thread Starter batta2711

    (@batta2711)

    Thanks. It worked!

    Here is the line I edited:

    <?php if(get_post_meta($post->ID, ‘ace_wide’, true)) { echo ‘<section class=”section-wide” role=”main”>’; } else { echo ‘<section class=”section” role=”main”>’; } ?>

    I changed the if/else to be the “section main” as default and the”section-wide main” as the alternative.

    Thanks for your help, much appreciated…

    I am having trouble removing the sidebar with links and categories on this site. I looked in my single.php and found no mention of section or sidebar to remove.

    https://ncfbla.org/albums/

    THANK YOU for any help that can be provided.

    Plugin Author TV productions

    (@tv-productions)

    @jmsbond002

    The page you’re referring to is the archive page. So you have to edit archive.php instead of single.php. Just follow those instructions, only read archive.php where the instructions say single.php.

    THANK YOU!! Worked like a charm!

    Thanks for great plugin!

    Is there any reason not to include WordPress template chooser block in Edit Album view?

    Plugin Author TV productions

    (@tv-productions)

    @gaspar

    The metabox you mean is page-attributes and that is actually why it is not included by EPA: it is for pages.

    So the only way to change the album template is to make child theme and make changes in code?

    I found a way by changing the my themes default Layouts. As I am using the Responsive theme I did; Appearance>Theme Options>Default Layouts> and set ‘Default Single Blog Post Layout’ to ‘Full Width Page (no sidebar)’. If your other pages are set to default just change them to your required layout.

    @tv productions

    If it acts like a page and I change my Page Layout settings and it changed the album page, then surely its is a page or closely related to a page?

    Plugin Author TV productions

    (@tv-productions)

    @jamezwatson

    Either post, page and easy-photo-album are custom post types. The view of any post type can be changed by creating the single-{$post-type}.php file in your theme. If you want a special layout for albums, you have to create single-easy-photo-album.php (see the second post in this thread).

    Some helpful links:

    I hope this helps you out. If you have any questions, please ask them here.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Remove sidebar from album page’ is closed to new replies.