Forum Replies Created
-
AuthorPosts
-
yup, it would seem that as of Enfold version 4.7.6.4, does not support the new Google Analytics 4.
BUT,
it is possible to create the old “Universal” Google Analytics still…
https://support.google.com/analytics/answer/9304153?hl=en#UAi just did that, got the “UA-xxxxxxx” number rather than the “G-xxxxxxx” number; used the code provided and it looks to be working (according to the Google Analytics Chrome Extension) – will have to see after a day or so to see if the data starts rolling in.
(FYI)hi Ismael,
thanks for your reply.
yeah, i kinda figured after playing with all the options (a lot).so, to answer your question (see attached screenshots) – i have a bunch of people’s headshots to put on a page and under them list links to other places that are relevant to that person. problem is, some have a LOT of links whereas others have just one or two. so i was trying to find a way to wrap the blocks in a masonry style so there wouldn’t be a lot of empty space. does that make sense?
aside from adding custom code (which i’d rather not do if i can get away with it), i think my only option is what i started doing here in these screenshot/test page is – which is to just have 4 x 1/4 layout blocks and just try to visually add other entries where the height would aprox match across the 4 columns.
i did the same thing with the “grid” layout block, but it seems to produce the exact same affect (is there any reason i should use that instead?).am open to other suggestions, but understand there may not be any other than what you said about adding custom code.
thanks for your help!July 15, 2020 at 11:48 pm in reply to: What's the Definitive methods for Lightbox/Modal's in 2020? #1230775thanks Ismael,
i’ll check it out.
the main reason i started looking in to this is – i was needing to create a data-table, one which would not shrink in size nor collapse for mobile. i was originally hoping to load this in the lightbox, but when the browser window shrinks or loads on mobile, there are no horizontal scrollbars to scroll horizontally with for the table viewing. i tried adding the scrollbar element to the iframe tag, and i played with css for all the wrappers too, but it just wouldn’t work. i eventually gave up & just made it’s own page for it. but would be nice for the lightbox to have more accessible features.
thanks.
The Text Block in Enfold does use Classic Editor so all those formats showing on top of the classic editor will also be similar when using Text Block.
Basically Visual mode is like a Microsoft Word while Text mode is like a Code Editor, it won’t show any colors and some options/format won’t be available but switching from Visual to Text and the other way around shouldn’t cause any code or styles removed, most likely what happens is some code (Text) shows as a color in Visual mode.yes – the Text Block IS what i’m referring to.
no – the Text TAB in the Text BLOCK does NOT show all the P tags, unless a p tag includes a class or styles etc. otherwise, it is always missing. not just in my installation, but in several others on other servers by other people.
this is NOT a “wpautop” issue (to my understanding).
this is apparently how the text TAB works. i am hoping for a way to make the text TAB show all the P tags as well as any other tags it might be “hiding”. i say “hiding” because they ARE actually there, their just not shown in this TAB.i’m surprised nobody else has complained about this or asked for a workaround.
BUT… all that to say, i am now utilizing the “Code View” button available after installing the TinyMCE Advanced plugin.
unfortunately, that also has visual problems in that it does not keep any hard returns or indents.well, i can do that, but… not sure why. what i’m talking about seems to be standard across multiple websites that use Enfold. i am new to WordPress & so far i’ve only use Enfold as a theme, so i don’t know how the TinyMCE “Classic” Text tab behaves normally (or in other themes).
i am assuming that by your message, you believe (or know to be true) that <p> tags ARE visible in that editor, & you want access to mine because you believe what i’m experiencing is an error that can be fixed – right/wrong?
i’ve worked on 5 completely separate Enfold WP sites/projects thus far, & this behavior is true with all of them. so how is getting in to my site going to help?
(and i do appreciate your time & attention:-)
April 8, 2020 at 1:07 am in reply to: What's the BEST way to add css &/or js to a single page withOUT adding to theme? #1201729okay, after a LOT of reading, i believe i better understand this. here’s what i’ve come up with, for reference…
first – the inconsistencies i see in the Enfold documentation are just that, inconsistencies.
from what i understand, we should add the “use strict” to all our added jquery/js.second – if we add “jQuery” instead of “$” to the main function wrapper, then the other dollar signs won’t cause conflicts in WP.
thirdly – the proper way to add external JS & CSS is with the wordpress “enqueue” options. as you can see in my final code below, there’s “wp_enqueue_script” to add js & “wp_enqueue_style to add css. and it’s recommended to add a js & css folder in your child theme for such files.
note, the “get_stylesheet_directory_uri” is correct for both css & js files. but also note, it’s a little different if your referencing files outside of your child theme folder.and lastly – the “is_page()” part is what makes this code in the functions file to be skipped except for that particular page id. and the way to find that page number is when you go and “edit” the page, the look at the url, it’s after “post=”.
function paypal_forms() { if(is_page( 2132 )){ wp_enqueue_script('name-of-library-here', 'https://cdnjs.cloudflare.com/ajax/libs/path-to-desired-library.js', array('jquery'), 1.19, false); wp_enqueue_script('name-of-my-script-here', get_stylesheet_directory_uri().'/js/filename-of-my-script.js', array('jquery'), 1.0, false); wp_enqueue_style('name-of-my-style-here', get_stylesheet_directory_uri().'/css/filename-of-my-style.css', array(), '1.1', 'all'); }} add_action( 'wp_enqueue_scripts', 'paypal_forms' );
hope that helps,
✌🏼- This reply was modified 4 years, 8 months ago by SyberKnight.
April 8, 2020 at 12:41 am in reply to: How to auto-convert all Absolute (domain) links/url's into Root-Relative ones? #1201728@Mike
understood. thanks.
if you all have any recommendations on best methods when transferring a site from development server to live server – converting all the domains in bulk – i’d appreciate it.
i suspect (like with so many other things) it’ll be the job for a plugin – if that’s the case, i’m also open to which one’s are the best & most stable & easiest to use.
thanks.April 8, 2020 at 12:37 am in reply to: How to make the Advanced Layer Builder DEFAULT when creating a new page/post? #1201727@Ismael,
that’s great, thank you!for reference, i’ve been cobbling together all i could find on the subject and i “THINK” i’ve found a great solution that (so far) works.
first, i’m disabling the WordPress Gutenberg “new” editor (cause i think it sucks); but that leaves the previous WP default “classic” editor button.
second, with your code, i’m auto-clicking the Enfold Advanced Layer Builder button on new page/post creations.
third, i’m auto hiding the WP classic editor button (so nobody can accidentally click it & get confused or whatever – really, it just makes me feel better).
fourth, i’m hiding the words that say which editor was used on the page/post listing pages to have a cleaner interface.✌🏼
// ADMIN: DISABLE WP GUTENBERG EDITOR FOR POSTS & POST TYPES add_filter('use_block_editor_for_post', '__return_false', 10); add_filter('use_block_editor_for_post_type', '__return_false', 10); // ADMIN: AUTO-CLICK TO ENABLE ENFOLD'S LAYOUT BUILDER WHEN CREATING NEW PAGES/POSTS function trigger_alb_on_load(){ ?> <script> (function($){ $(window).load(function() { $("#avia-builder-button").trigger('click'); }); })(jQuery); </script> <?php } add_action('admin_head-post-new.php', 'trigger_alb_on_load'); // ADMIN: HIDE WP DEFAULT EDITOR BUTTON function hide_default_editor_button() { echo '<style> #avia-builder-button { display: none; } </style>'; } add_action('admin_head', 'hide_default_editor_button'); // ADMIN: HIDE EDITOR INFO IN LISTINGS function remove_ALB_post_state( $post_states, $post ) { if("! has_blocks( $post->ID )") { unset($post_states['wp_editor']); } if("!= Avia_Builder()->get_alb_builder_status($post->ID)") { unset($post_states['avia_alb']); } return $post_states; } add_filter('display_post_states','remove_ALB_post_state',999,2);
EDIT 2: okay, so i found a crude workaround.
my -2¢ would be for the developers to allow for code blocks that are not wrapped & don’t take up any space in the page layout.but in the meantime, here’s what i figured out in case it would help anyone else…
put the code block inside a “Color Section” (which is one of the layout blocks). this one, unlike the others, will put your custom class in the top-most wrapper.
so insert the color section, then go to the developer area & give it a custom class name (ex: custom-class-name).
then put your code block inside that.
then inside your code block, at the top before your <script> tag, put…<style> .custom-class-name.avia-section { min-height: 0; } .custom-class-name .content { padding-top: 0; padding-bottom: 0; } </style> <script> ///your js code </script>
…note, there should be NO space between “.custom-class-name.avia-section” but there SHOULD be a space between “.custom-class-name .content”
if anyone has a better solution… i’m all ears! :-)
April 3, 2020 at 9:53 pm in reply to: How to auto-convert all Absolute (domain) links/url's into Root-Relative ones? #1200653anyone? anyone?
April 3, 2020 at 9:52 pm in reply to: What's the BEST way to add css &/or js to a single page withOUT adding to theme? #1200651@Rikard, thank you!
so, just to be clear – to make sure i completely understand…
when the pages load, & the functions.php file gets read, everything inside the function with “is_page(###)” gets skipped for all pages that are not that particular page, & so avoiding any performance hits that code may cause – right?
okay, so, i followed the above link to get the “if(is_page( 3739 ))” bit. is that correct? where do i find the number associated with the pages?
next, i followed the link provided there to https://kriesi.at/documentation/enfold/add-custom-js-or-php-script and find this code (& i added the “if is page” part)…
function my_custom_function(){ if(is_page( 3739 )){ ?> <script> // Your function here jQuery(window).load(function(){ console.log('Hello World!'); }); </script> <?php }} add_action('wp_footer', 'my_custom_function');
…if i’m adding my code to the main Functions.php file, then why is there the “add_action(‘wp_footer’)” part there? do i change that be ‘wp_functions’ or something?
also, where in the page load does the function.php parts come in – the head or foot?
if i need to add some external script references and some js form validation and some css for the form, would that be better put in the header.php file or the functions.php? it looks like, according to the linked doc page, that the same code is used for either file.and lastly, later in that doc page it talks about needing to use “use strict” for custom js. i’m confused by this because i’ve seen other js code added to functions like this that do not use strict mode (like even in the examples before that one). what are the criteria for needing to use this strict part?
i also noticed inconsistencies with using “jQuery” vs the dollar symbol – is that simply interchangeable?
inside a function, between the closing ?> & rebeginning of <?php, is that just an open html area? so conceivably, i could do something like this…
function my_custom_function(){ if(is_page( 3739 )){ ?> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.1/jquery.validate.min.js"></script> <script> $(document).ready(function() { $('form').each(function() { $(this).validate({ //etc// }); }); }); </script> <style> form { /*css styles*/ } </style> <?php }} add_action('wp_head', 'my_custom_function');
…or do i have to download the cdnjs file(s) & put them in my child theme/js folder & use this example from the doc page?…
function my_custom_scripts() { wp_enqueue_script( 'custom-script', get_stylesheet_directory_uri() . '/js/my_custom.js', array( 'jquery' ) ); } add_action( 'wp_enqueue_scripts', 'my_custom_scripts' );
…if so, then what does this “wp_enqueue_scripts” thing?
sorry, but as i got going, i realized that i’m still confused on the more detailed points.
thanks!April 1, 2020 at 12:15 am in reply to: How to make the Advanced Layer Builder DEFAULT when creating a new page/post? #1199582anyone? anyone? :-)
:-(upon further research, it seems that this is a pretty widespread issue, & perhaps even intentional.
i found a workaround @ https://kriesi.at/support/topic/onclick-event-on-html-link-dissapears-on-save/
to basically use this as the link in the text block…<a href="#" id="mailHidePop">on click link</a>
…and add a code block at the bottom of the page with this…
<script> (function($){ $(window).load(function() { $("#mailHidePop").on('click', function() { popup = window.open('https://mailhide.io/e/xxxxxxx?compact=true','mailhidepopup','width=580,height=635'); popup.focus(); return false; }) }); })(jQuery); </script>
…and that seems to be working fine.
-
AuthorPosts