Support

Home Forums Event Espresso Premium EE4 displaying widget side bar when none is selected

EE4 displaying widget side bar when none is selected

Posted: March 9, 2016 at 6:45 pm

Viewing 20 reply threads


Michel Hurrell

March 9, 2016 at 6:45 pm

On my event page
https://www.vivaci-t.ca/events/

I am loading the sidebar widget. I do not want any sidebar. In my options of the page i have selected the full width but it seems not be changing this. Any idea why this is. I have just migrated over to EE4


Tony

  • Support Staff

March 10, 2016 at 2:03 am

Hi Michel,

https://www.vivaci-t.ca/events/

Does not display a page, even if you have one within the admin.

Its actually an archive of EE events which means it uses your themes archive.php template and not a single page template, so its likely your theme always includes a sidebar on archives.

Within the theme options does it allow you to set sidebars for archives?


Michel Hurrell

March 10, 2016 at 11:56 am

I mage changes to the EE events page in the standard.php. I changed some buttons around in there. In terms of the archives, i am unsure about where i would find where it allows you to set the sidebar for the archives. I can change the pages post to fullwidth or default templates, so it seems to be ignoring those. It never did this before with EE3 if that helps any.

Any help would be greatly appreciated.


Tony

  • Support Staff

March 10, 2016 at 12:42 pm

It never did this before with EE3 if that helps any.

EE3 worked differently, with EE3 you have the [ESPRESSO_EVENTS] shortcode within a standard page, you could set that page to load a specific page template.

EE4 events are custom posts, meaning they work in a very similar way to standard posts, which is why /events/ works the way it does.

In terms of the archives, i am unsure about where i would find where it allows you to set the sidebar for the archives.

Some themes allow you to set this within the theme options, yours may not.

So to do this you’ll need to alter your themes archive.php template file (if it has one), are you familiar with WordPress templates?


Michel Hurrell

March 10, 2016 at 1:29 pm

OK i get it, So i went to the page that the EE code is embedded to and changed it to the full width page. Didn’t change anything.

In addition I have told wordpress to put the sidebar to the right side for the blog but it still puts it to the left side. I am ok with forcing the sidebar to always stay on the right side if you guys can help me with that.


Tony

  • Support Staff

March 10, 2016 at 1:40 pm

OK i get it, So i went to the page that the EE code is embedded to and changed it to the full width page. Didn’t change anything.

Which page?

I am ok with forcing the sidebar to always stay on the right side if you guys can help me with that.

To fis this you’ll need to alter one of your themes template files and set it specifically for EE events arvhies, are you familiar WordPress templates?


Michel Hurrell

March 10, 2016 at 1:49 pm

So i noticed that my blog page will not move the sidebar over to the right, I need to update the template. Any ideas?

<div class="motopress-wrapper content-holder clearfix">
    <div class="container">
        <div class="row">
            <div class="span12" data-motopress-wrapper-file="archive.php" data-motopress-wrapper-type="content">
                <div class="row">
                    <div class="span12" data-motopress-type="static" data-motopress-static-file="static/static-title.php">
                        <?php get_template_part("static/static-title"); ?>
                    </div>
                </div>
                <div class="row">
                    <div class="span8 <?php echo of_get_option('blog_sidebar_pos'); ?>" id="content" data-motopress-type="loop" data-motopress-loop-file="loop/loop-blog.php">
                        <?php get_template_part("loop/loop-blog"); ?>
                    </div>
                    <div class="span4 sidebar" id="sidebar" data-motopress-type="dynamic-sidebar" data-motopress-sidebar-id="main-sidebar">
                        <?php dynamic_sidebar("main-sidebar"); ?>
                    </div>


Josh

  • Support Staff

March 10, 2016 at 3:11 pm

You remove the last part:

<div class="span4 sidebar" id="sidebar" data-motopress-type="dynamic-sidebar" data-motopress-sidebar-id="main-sidebar">
  <?php dynamic_sidebar("main-sidebar"); ?>
</div>

and change where it says span8, you change it to be span12.


Michel Hurrell

March 10, 2016 at 3:14 pm

Thanks so much that worked, How do i force it on the right side?


Josh

  • Support Staff

March 10, 2016 at 3:30 pm

I’m not sure what you mean by it?


Michel Hurrell

March 10, 2016 at 4:47 pm

How do i move the sidebar to the right side of the page? Thanks


Josh

  • Support Staff

March 10, 2016 at 5:22 pm

That’s a great question that the theme author or theme support staff should be able to help you with.


Michel Hurrell

March 10, 2016 at 10:56 pm

ahh sorry I thought you could see the code and be able to point me in the right direction. Thanks though.


Michel Hurrell

March 11, 2016 at 12:52 am

Ok looked into this a bit more. I am using WPML to translate to French for my site. I have two event lists, one in English and one in French. Right now they are the same language for comparisons sake. The original content is in english and the translation is going to be French.

https://www.vivaci-t.ca/events
https://www.vivaci-t.ca/fr/evenements

I have the fullwidth template selected at this time. For some reason the original page completely ignores and the WPML page picks it up. Any idea guys?

It seems that it keeps picking the archive.php no matter what i select. Why is it ignoring my template select?


Tony

  • Support Staff

March 11, 2016 at 3:21 am

Hi Michel,

As I mentioned previously:

https://www.vivaci-t.ca/events

Is not a page, so you can not select a page template if a page is not being displayed.

You need to grab a copy of your themes archive.php template file and name it archive-espresso_events.php

Make any changes you want to that template (remove the sidebar, make it full width etc) and then upload that to your theme (preferably using a child theme)

That will remove the sidebar from your events archive listing (along with any other changes you make).

You’ll then also need to add:

add_filter( 'FHEE__EED_Event_Archive__template_include__allow_custom_selected_template', '__return_true' );

To your themes functions.php file to allow EE to use the custom ordering function within the archive.

Does that help?


Michel Hurrell

March 16, 2016 at 12:45 pm

Yea so after doing what you said and the sidebar still wouldn’t move, I found out why. Maybe you can shed some light on it.

float right:
.rightright: : espresso_default.css:707;


Michel Hurrell

March 16, 2016 at 12:46 pm

Sorry let me shed some light on that, This is the CSS i found, it was overriding other CSS of my pages.


Michel Hurrell

March 16, 2016 at 1:08 pm

Another update, I moved event espresso_defaults.css out of the folder like it is told.

/*******************************************************/
/****                     -==ATTENTION==-                     ****/
/****         MOVE THIS FILE BEFORE EDITING         ****/
/****                                                                           ****/
/****                   Please move this file to:                ****/
/****   wp-content/uploads/espresso/templates  ****/
/****                  directory before editing                 ****/
/****                                                                           ****/
/*******************************************************/

Now the sidebar displays on the correct side, Why did it do this?


Michel Hurrell

March 17, 2016 at 1:54 am

Ok here is another update with all of this, first of all my web browser was pulling the CDN and not the live version of the site. I fixed that. I moved the espresso_defaults.css as instructed and my CDN is not serving the file. Should I leave a copy of the .css in the orignal location?

Question 2:

https://www.vivaci-t.ca/evenements/
https://www.vivaci-t.ca/en/events/

These are still different in how they display and they have identical .php files from what I can tell. I basically copy and pasted the page.php into the archive-espress_events.php

Thanks guys for the help so far. I am almost there.


Michel Hurrell

March 17, 2016 at 7:52 pm

I put the file espresso_defaults.css and now we are back to the same problem with the main events page floating the sidebar to the left, do to espresso_defaults.css. Any ideas why the plugin is telling it to float over..


Tony

  • Support Staff

March 21, 2016 at 3:30 am

I can’t view the page currently due to the errors mentioned in your other thread here:

https://eventespresso.com/topic/errors-2/

So your now loading a sidebar rather than removing it?

Once you disable the add-ons from the other thread I’ll take a look at the page and see what is causing it. Its likely an issue with the theme or how you have the template setup so you may need to contact the theme authors for further help.

We will know more once the page loads.

Viewing 20 reply threads

The support post ‘EE4 displaying widget side bar when none is selected’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso