Jump to content

Archived

This topic is now archived and is closed to further replies.

honeytrek

Featured slider code on all pages of site

Recommended Posts

honeytrek

I only see the slider on my homepage http://HoneyTrek.com (as desired).

But when i view source on another page,let's say an individual post view-source:http://honeytrek.com/mekong-delta-vietnam/ i see all the code for the featured slider and it seems to pull in the images and everything, slowing down my page i am sure.

 

any help?

Platform Pro 1.6 (with platformbase)

Wordpress 3.5

 

Thanks guys!

Mike

Share this post


Link to post
Share on other sites
James B

Hi there, in the settings for the slider drag and drop have you chosen the option to hide on post pages? - http://screencast.com/t/IHBWN2orRW

 

As the slider is in the header of the site it's a global section, so will be loaded on every page unfortunately, using that option above will only hide it, the code will still be present in the layout. Platform Pro was the first drag and drop system, so it is rather limited compared to the Framework in terms of where the items were positioned and how they hidden/removed from the template.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
honeytrek

James, thanks so much for your reply here (and all your replys, you are a freaking champ!).

 

So I think all these large images loading on every page is hurting my page load speed.....do you agree James?

Either way, is there a way I can remove that code from the header and just add it to the homepage?

 

Thanks so much,

Mike

Share this post


Link to post
Share on other sites
James B

Hi Mike,

 

Thanks :-)

 

Yes you can remove out of the header in the template setup and place into the default page or page content area, this will then only appear on static pages and not post pages. To be honest it should harm the site speed to much depending on the image sizes and content, once you site is finished (don't install prior as it can cause problems) you install a cache plugin like w3 total cache which saves a static html version of the page so it's served quicker when viewed by the html page. This reduces the load time on pages dramatically so would definitely be worth trying this to improve speed issues.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
honeytrek

hmmm....i am a bit nervous about taking out out of the template section and adding it to the default page (is that homepage?). any pointers on where to paste the featured slider code on what files? should i do it in my child theme?

 

also i do have caching on at the moment, but still telling me i have massive images (my featured slider) all throughout my site.

Share this post


Link to post
Share on other sites
Danny

Hi Mike,

 

As James mentioned above, Platform was limited in terms of where it allowed you to position sections and is has been a legacy theme for nearly a year, meaning support is limited.

 

What I would recommend is you upgrade to PageLines Framework or better yet DMS, as DMS comes in both a lite/free version and a pro version.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
honeytrek

Danny, do you think all the code i have written and look & feel of my platform pro account will easily "port" over to the Framework or DMS lite/free version? I don't want to have to re-code all i have done on Platform Pro.

Share this post


Link to post
Share on other sites
James B

Hi there,

 

Honestly, as the system is different from the original Platform theme a majority of the upgrade is manual. Your post and page content will remain the same as that's saved into the DB. However the styling and the layout will need to be recreated using the new drag and drop options inside DMS, copy/pasting over your custom css etc.

 

A full description of this process can be seen at http://docs.pagelines.com/getting-started/upgrading-migration to give you a better idea.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
honeytrek

Thanks James!

 

Without asking too much of your time on this issue, do you know what file I would go to (in Platform Pro, or Base?) and what file to move the code to, so that it ONLY shows on the Homepage.

 

Thank bro. any direction would be awesome,

Mike

Share this post


Link to post
Share on other sites
Danny

I don't think its possible with Platform to use a hook to pull the section to only display it on your homepage, as I mentioned above Platform was limited in regards to where you can position some sections.

 

The only way around with would be to remove the Feature slider section from your Header template and add it to a page, then assign that page to your Homepage and use a different templates for the rest of your sites pages.

 

In DMS this is incredibly simple, that is why I recommend upgrading. If I was you, what I would do is download DMS and an application like MAMP or AMPPS and create a local site for you to work on, then recreate your current site into your local DMS installation.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
honeytrek

Danny, I solved this with this snippet of code inside - config.templates in platformpro/includes.

 

//Sections With Custom Post Types
$homepage = "/";
$currentpage = $_SERVER['REQUEST_URI'];
if($homepage==$currentpage or is_admin()) {
pagelines_register_section('PageLinesFeatures', 'features'); // 'features'
}

 

As far as I can tell it works, i only see the featured slider on the homepage now, and when i view source on other pages of the site, i no longer see it calling all my massive slider images. Also I added in the is_admin() so the features option is available when i am in Admin panel.

 

Thanks again for the help, and for still responding to us legacy users.....you are a honestly my hero (and i think a few others on this forum)!!!!,

Mike

Share this post


Link to post
Share on other sites
Danny

Cool Mike. However, please be aware that we do not recommend editing core files nor is this something we provide support for. So if this customization in the future cases you some issues, you will be on your own unfortunately.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
honeytrek

This is the only change I have ever made to the core file, and I just really needed it to remove those massive image calls from every page of my site. But I will be sure not to ask you any questions that relate to my change there.

 

Thanks again,

Mike

Share this post


Link to post
Share on other sites
Danny

Oh I didn't mean that you're unable to ask questions, it's just that if you do in the future have some issues. We will need for you to remove that code before we can assist as that may be the cause of any issues you encounter. Anyway, awesome job with the code and thanks for sharing.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

×