Jump to content


Photo
- - - - -

Pageglines Javascript Code display problem with WP 3.5.1

Pagelines Javascript

  • Please log in to reply
5 replies to this topic

#1 dsh2000

dsh2000

    Advanced Member

  • Members
  • 44 posts

Posted 22 February 2013 - 08:52 PM

Dear Pagelines Community,

 

I have not really seen this issue posted before, so I'm posting now.

 

As we all know, WP 3.5.1 has been released.

 

I have encountered a problem when I try to paste a javascript ad code into a post.

 

The problem is, that the code does not display right using the Pagelines theme.

 

I'll give two examples, both using the same javascript ad code.

 

First on Pagelines w/ WP 3.5.1:

Please Login or Register to see this Hidden Content

 

Next, same code on another non-Pagelines theme w/ WP 3.5.1

Please Login or Register to see this Hidden Content

 

Are there any ideas on what the cause can be?

 

I have disabled all plugins, and the display problem is still occuring.

 

Thank you,

-Daniel



#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 22 February 2013 - 09:19 PM

Hi Daniel,

 

Keeping in mind that we're a framework, not a theme, we must consider the container for the ad itself.  There are much more specific sections and containers for code in PageLines Framework than you'll find in typical themes. As a result, one must add the javascript in a proper container.  That said, you can pretty much add your javascript in most places on the site.

 

If you're adding it inside the post, there's a few things to remember.

  • You should add the code in Text mode (the right/top tab over the post edit panel when adding the post). This ensures that WordPress will not modify the code changing things like brackets to ascii code. Added in the Visual mode, the javascript can break, causing the ad to appear oddly.
  • The width of the ad should not exceed the width of the layout for the Content Area.  A good rule of thumb is to calculate the width of the ad plus 50 pixels (10px padding plus 15px margins on either side).  Go to Dashboard > PageLines > Site Options > Layout Editor.  Depending on how you have your site structured, the Content Area's Main Column is the one you want to check.  If this is narrower than the width of the ad it could corrupt the code or cause the ad to break through that area, bleeding under the sidebars.   Often, people seeking to use ads within the content will apply a 325x300px or 300x250px  or a 468x60px ad size to ensure it fits.

Depending on where you want it placed, you might want to try the Content Box, which may be included top or bottom in the Main Column (Content Area) via Drag & Drop.  Unfortunately, this cannot be placed in the middle of your post content, if that's your intent.

 

I hope this advice helps you achieve your goals. If you need any additional assistance, please let us know.



#3 dsh2000

dsh2000

    Advanced Member

  • Members
  • 44 posts

Posted 22 February 2013 - 10:22 PM

Hi Rob,

Thank you as always for your advice.

When I added the script to the post, I used the Text mode.

WP 3.5.1 now has this as Text mode, but it used to be HTML mode, could it be possible that this is the problem?

With regard to the width of the ad and the content area,

the  ad does not display properly even on a full-width page of 1100px (ad is 728px).

Please Login or Register to see this Hidden Content


 



#4 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 22 February 2013 - 10:44 PM

The only other thing I can think of is that there may be some CSS associated with the ad that's either outdated (not CSS3) or, conflicting with other code or perhaps, simply incorrect by contemporary standards used by PageLines Framework versus themes.

 

Can we try going to Dashboard > PageLines > Drag & Drop and adding the Content Box (it must be installed and activated through the Store - though it's free) to the Content Area for the template you're using (if a page) or, for Blog Page.  I'd recommend using a page for testing, versus a post, so the template's best.

 

Click on Content Area. Select the template you will use (from 1 to 5), then drag Content Box to the top of the Active Sections.

 

Open a new page, select that tempate and save as a draft.

 

Scroll down to PageLines Meta Settings and paste your ad code in the Content Box area.  Select the full-width layout, for good measure and Publish.

 

If you see the problem when the code is in the Content Box, then the problem isn't the Text Mode.  By the way, yes HTML Mode is now called Text, I don't think that's an issue.  They relabeled that tab to avoid confusion - some folks thought it was only for adding HTML code, not for viewing things as a text editor.



#5 dsh2000

dsh2000

    Advanced Member

  • Members
  • 44 posts

Posted 26 February 2013 - 04:58 PM

Hi Rob,

 

Thank you for your help.

 

After a few days of trying, I am still not able to make this Javascript work in the base theme of my Pagelines framework.

 

I have tried a few different things in addition to the Content Box area.

 

This code does not work in the sidebars, nor does it work when I use the "Simply Custom" section from the Pagelines store.

 

This Javascript code works just fine on other themes, but I do not want to say that Pagelines is incompatible so I tested with similar Javascript code, and they appear to be displaying normally.

 

Please Login or Register to see this Hidden Content

 

I'm still not sure how to go about fixing this, but I'll keep looking. Thank you again for your help and suggestions, they're always appreciated!

-Daniel



#6 mackenzie

mackenzie

    Advocate

  • Members
  • 333 posts
  • Country: Country Flag

Posted 26 February 2013 - 07:17 PM

Just keep us updated :)