jlanpheer
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Astra] How to change mobile breakpoints (continued)Bump!
Trying to finish my project up here. I’ve got some strange resizing of elements as noted above that are not occurring at the breakpoints set in the suggested manner. Not sure what it could be and i am wondering if there are other factors in the theme that could be causing this unexpected responsive behavior? Thanks.
Hi Judith! Yes, i posted this thread originally a month ago and hadn’t heard anything from anyone so i figured out another design approach that worked around this. So yes, it is fine to close this issue. I didn’t get it ‘solved’, i just took another path, i couldn’t wait any longer. Thanks for checking back! Cheers!
Forum: Themes and Templates
In reply to: [Astra] How to change mobile breakpoints (continued)As an additional note, i seem to also have another breakpoint at 1025px, which as i understand it, is a ‘standard’ breakpoint. Yet, i don’t have anything in my functions.php file that sets that as a responsive breakpoint. I’d really like to understand the mechanism that is causing this behavior. From everything that i’ve read, it’s the theme that controls this behavior, but something is not adding up.
Forum: Themes and Templates
In reply to: [Astra] How to correctly modify layouts for mobile devicesNever mind, i figured it out. For those coming later and reading this, the desktop/tablet/mobile icons at the top of the design page are only a VIEW of ALL the content of the page, they are not 3 separate customizable layouts.
My work involves switching between different containers and different screen sizes and i was confused by the fact that ALL the containers were showing up (even in views where my css had them ‘hidden’). In other words, the responsive icons at the top of the page ignore your css, they simply show all the blocks as they would show at that screen resolution.
It makes for a messy layout, but at least i understand it. Closing this issue.
Forum: Themes and Templates
In reply to: [Astra] how to change mobile header breakpointYes, this does help. Not sure why you would take away functionality, but this article does the trick, thank you.
Forum: Themes and Templates
In reply to: [Astra] How to correctly modify layouts for mobile devicesCan anyone help me out here? Do i have the ability to have three layouts depending on which view (mobile/tablet/desktop) is active? Or, do i need to put all three layouts on a single page and conditionally show them based on breakpoints and styling in style.css? See above…..
Forum: Themes and Templates
In reply to: [Astra] Icon in Secondary Header using Astra ProHi Herman, thanks again for your suggestions, i did finally figure this out and i appreciate your response and help.
cheers, jim.
Forum: Themes and Templates
In reply to: [Astra] Toggle transparent nav elementHi Herman, i did not see your reply earlier, but that DID help, and i appreciate the tip! Thank you very much!
Forum: Developing with WordPress
In reply to: Best practices for dequeueing styles in pluginsThank you for your suggestions and taking the time to offer advice, that is MUCH appreciated! I will play with some of your suggestions and report back.
I guess what is most baffling to me at the moment is that currently is how WordPress enqueues these styles. In my current case, i’ve got ‘style1’ associated with ‘plugin/page1’ and ‘style2’ associated with ‘plugin/page2’. When i test how ‘page1’ appears once it is served, SOMEHOW the style for ‘plugin2’ has been instantiated even though i have not even submitted a request for page 2 yet. I don’t understand how a style for a page can be enqueued without the page having even been requested. As i was pondering this last night, i guess that is the thing that i perhaps truly do not understand. That makes no sense to me at the moment.
Thank you for sharing your insights!
Forum: Developing with WordPress
In reply to: Best practices for dequeueing styles in pluginsI’m not at all sure what you mean by solving this via the child theme. I have chosen the Astra theme (supposedly for its ‘customizability’) and created a child theme from it. Are you suggesting that i cannot do this: (1) load a page, (2) enqueue a style for that page in the header, (3) serve the page, (4) dequeue that style? Maybe “I’m” missing something, i thought that was was the process of enqueueing and dequeueing was all about….
I’ve essentially created shortcodes for each of my pages and each shortcode has its own plugin that represents the functionality of a page.
- This reply was modified 3 years, 6 months ago by jlanpheer.
Forum: Developing with WordPress
In reply to: Best practices for dequeueing styles in pluginsTo further clarify, some of the styling elements DO remain the same from page-to-page (fonts, color palette, etc….), but there will be up to five custom pages, i haven’t found a template that will accommodate what we’re after, and i’ve resolved to build it out myself. And, i’m actually mostly done, save for the styling. Maybe there’s another way that i should go, or could have gone. It all started with my frustrations with contact_form_7, which i simply couldn’t get it to do what my client needed. I’m open to other ideas and maybe there’s a ‘right way’, but this way is working…. up to this point.
Forum: Developing with WordPress
In reply to: Best practices for dequeueing styles in pluginsI have two custom pages of a site that i am building, each with their own custom styling requirements. In this case, the ‘about’ page has its own styling requirements that are completely different from the ‘contact form’ page. I guess that i could put all of it together in one plugin, but i was trying to keep them separate for potential future re-use. I have at least two more pages coming that will also have their own unique style quirks as well, but i’m not there yet. I want to understand and implement the design pattern first.
Forum: Developing with WordPress
In reply to: Best practices for dequeueing styles in pluginsOK, i tried that and i guess i’m just not understanding something, so i will give a code example. I’ve built two plugins representing two custom-built pages of a site, we’ll call them ‘plugin_page1’ and ‘plugin_page2’. In each one, i have enqueued the style for that page something like this:
function create_plugin_page1_header() { require_once(ABSPATH . 'wp-load.php'); require_once( ABSPATH . 'wp-config.php' ); wp_enqueue_style( 'plugin1-style', plugin_dir_url( __FILE__ ) . 'css/plugin1.css', array(), 1, 'all' ); } add_action('wp_enqueue_scripts', 'create_plugin_page1_header');The second plugin’s style was instantiated in the very same way, just in its own php file (replace ‘plugin1’ with ‘plugin2’). Also, in each plugin’s main file, i have placed the following code (again, slightly different to accommodate that plugin’s specifics):
add_action( 'wp_enqueue_scripts', 'plugin1_deregister_styles', 11 ); function plugin1_deregister_styles() { wp_dequeue_style( 'plugin1-style' ); }I’ve set the priority higher on the deregister function and i’ve done this in both plugins 1 and 2. A problem (not the only problem) is that when i load the page powered by plugin1, it does not have the styling that i desire, it has the styling from plugin2. And indeed, when i look at the header code in Chrome’s dev tools, the style for plugin1 is not registered at all, but the style for plugin2 (a page that i’ve not visited…yet) HAS been enqueued/registered.
So, i’m clearly missing a key concept here. Of course, i want to fix this code for my project, but i also want to understand the design pattern so that when i build plugins and work with child themes in the future, that i do it correctly and by the book.
Forum: Developing with WordPress
In reply to: Best practices for dequeueing styles in pluginsThanks you for your reply, i had already seen this. I guess what i’m unclear about is when/where to do this/put this code. If you are working with a child theme, i guess you might put this code in the child theme’s functions.php file. Where would you do this if you DON’T have a child theme? If you are writing a plugin which uses its own custom style, i guess i’m unclear on where the dequeueing is done. It seems to me that ‘cleaning up your mess before leaving’ is ‘good style’! :-). Thank you for your help!
Forum: Themes and Templates
In reply to: [Astra] Wrapper div doesn’t cover 100% of the viewport widthThank you Herman, yes i hope so. I originally posted in the Gutenberg Blocks forum, which was the wrong place and i’ve since opened up a thread on the Spectra forum and hope to hear something soon so i can finish this project up!
Thank you for your followup, i truly appreciate it!