Jump to content

Archived

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

nfp1900

Larger spacing using accordion code in the postloop rather than a textbox

Recommended Posts

nfp1900

I was trying to determine why the accordion code appears differently in the postloop rather than a text box. 

 

In the postloop it's this: http://screencast.com/t/iU2tEj0amrbut when the same code is dropped into a textbox the spaces disappear and it looks how it's meant to: http://screencast.com/t/Sp8Voynng3Bo

 

 

 

 

 

Share this post


Link to post
Share on other sites
Danny

Hi,

 

This is most likely because of the styling for the PostLoop and TextBox are different. Have you tried inspecting the code to see the different, as it is likely padding or margin.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
nfp1900

I checked the code and couldn't see anything different. Margin, padding etc is 0px in both cases. Perhaps there isn't a recommendation not to use the code in the postloop. 

Share this post


Link to post
Share on other sites
Danny

Can you provide a link to the page in question please.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny

The issue is related to WordPress adding breaks in the PostLoop code. Therefore, you either want to use [pl_raw] shortcode [/pl_raw] or remove any spaces in your accordion code.

 

You can see the <br> tags here - https://cloudup.com/cN-BK5MK3sx


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
nfp1900

Or leave it in the textbox... It's down to client editing but I will switch it over to a textbox.

Share this post


Link to post
Share on other sites
Danny

OK.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
nfp1900

The PL raw tags did help to remove the invisible line breaks in the postloop, thanks. 

Share this post


Link to post
Share on other sites
Danny

Awesome. Also, just note, the [pl_raw] shortcode only works on the WordPress page/post content editor it cannot work in sections.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • flourishdesignstudio
      By flourishdesignstudio+
      My DMS 2 site http://www.heart-stone.com/ will not save any new custom css... I can still edit templates and publish those but any custom css that I enter never saves.
      All WP files, themes, and plugins are up to date. 
      Any thought about what might be causing this?
    • flourishdesignstudio
      By flourishdesignstudio+
      Is there a way to edit the custom CSS via FTP? I know I can edit the custom code in the Chrome editor but is there a file path I can use to find and edit the CSS directly from our FTP?
      Thanks in advance for the help!
    • nizami
      By nizami+
      Using navbar section with correctly configured WP menu to display main navigation at https://elenaangel.com. 
      All fine in desktop viewport. Menu displays twice in hamburger mode. How to fix this please? 

×