inboundnow / retired-landing-pages

Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
http://www.inboundnow.com/landing-pages/
GNU General Public License v2.0
4 stars 2 forks source link

[acf] Svtle #221

Closed atwellpub closed 8 years ago

DavidWells commented 9 years ago

Logo is broken from my previous unsaved versions: http://www.screencast.com/t/8YKMWAUlyErg

I tried grabbing the old value and using it like:

$logo = get_field('svtle-logo', $post->ID, false); /* images need the false to disable formatting by ACF to be compatible with ACF 4 & 5 */

$old_logo = lp_get_value($post, $key, 'logo');
$final_logo = (isset($logo)) ? $logo : $old_logo;

but that didn't work either. Tried with and without acf pro activated. No luck.

It looks like this is happening on simple solid lite as well

DavidWells commented 9 years ago

NVM this conditional logic works to replace the logo I had:

$logo = get_field('svtle-logo', $post->ID, false); 
$old_logo = lp_get_value($post, $key, 'logo');
$final_logo = ($logo) ? $logo : $old_logo;
atwellpub commented 9 years ago

Found the issue with legacy images not displaying. But now there is an issue with broken fontawesome icons in the default content. Are you experiencing this?

DavidWells commented 9 years ago

negative. I am seeing the default checkmarks on the fontawesome list.

This template looks good to me

atwellpub commented 9 years ago

Here is what I am seeing:

With ACF Pro:

With ACF Lite

atwellpub commented 9 years ago

Make sure Inbound Pro is off and ACF Pro is disabled.

DavidWells commented 9 years ago

There is no checkbox in Svtle. What do you mean? I see default toggle values

But yeah with acf lite when I save the default content is gets garbled like this: http://www.screencast.com/t/qQlmbEgXvf38

DavidWells commented 9 years ago

This code fixes the line break problem but the list item shortcode output is still missing.

<?php
                 $content = wpautop($content);
                echo do_shortcode($content); ?>

This is the new page: http://www.screencast.com/t/rmnMhunZ

The list shortcode outputs a style block directly into the content (which is probably bad) https://github.com/inboundnow/landing-pages/blob/master/shared/shortcodes/inbound-shortcodes.php#L531-L562

Other shortcodes work though. Probably need to move the CSS output of the shortcode elsewhere

DavidWells commented 9 years ago

@atwellpub do you know how to inline this css in wp_head/wp_footer instead? https://github.com/inboundnow/landing-pages/blob/master/shared/shortcodes/inbound-shortcodes.php#L532-L562

The CSS IDs need to be unique in case there are multiple lists with different icons in use

atwellpub commented 9 years ago

I am not quite sure I understand the question, but I just ran another round of tests and the shortcode list checkmarks seem to be populating correcty before save, after save, with acf pro on, and off.

You could do it with an action hook.

atwellpub commented 8 years ago

Form below content on mobile is broke.