Nox
Forum Replies Created
-
I didn’t know synced pattern was a thing. I will take a look, thank you!
Hi bcworkz, thanks for your answer.
I’m not really to understand what you mean exactly. I can indeed use a specific template at the end of my post-type template, though it needs to involve fields the client can change within the back-office. Also the website use WPML so it need to be configurable for each language.
Hence my idea of using a custom post-type as the default wp_query only look for posts matching the current languages, and you can use ACF to make custom fields easily.
I agree that the best way would be to develop a specific system to do so, with a concept that doesn’t natively exists, but I don’t want to recreate the wheel for such project. Moreover I will need the same kind of “common block” within other post-types, so the solution should be expandable.
If you already used Drupal in the past, it allows the user to create a block with custom fields that can be placed anywhere in templates, and configured on the back-office. This block is independent from the place it is used, the page you use it in just register its id and point to it. So changing it would apply the change to each page basically. The problem here with WordPress is that it treats blocks as simple content (they’re basically HTML comments in content) and each time you use it, the block get its own id, and registers specific fields inside the post directly. So changing one in one page would not change it from all other pages where you use it, as they act independently. Unless I miss a feature that would allow me to force a block to share its content within all the pages?
Forum: Developing with WordPress
In reply to: Changing a column of paragraphs to a rowThe way to achieve a scrollable row would be to set them a defined width (
min-width
alongside the currentmax-width
) and use adisplay:flex;
property on your wrapper to align them as a row, then useoverflow-y: scroll;
rule to show a scroll bar. You can basically add this to your own styles:.page-client-stories .post_wrapper { display: flex; overflow-y: scroll; } .page-client-stories .post_container { min-width: 430px; margin-right: 50px; } .page-client-stories .post_container:last-child { margin-right: 0px; }
Though, it may need to be adapted for mobile too. You can reduce the min and max-width for smaller breakpoints.
Personal advice: in terms of UX, I don’t know think it is the best way to show up a content like this though. A carousel showing N-by-N items may create a better render.Same problem here, still accessible.
I’ve the same problem, no error in the logs.
No details, no error code.
Please give us a feedback.Forum: Fixing WordPress
In reply to: Allow access to a certain folder to admin logged users onlyI already tried this too, but it is still a paid plugin. They don’t mention it in the presentation page, but as soon as you installed it, most of options require the “entreprise” or “premium” offers unfortunately.
Forum: Fixing WordPress
In reply to: Allow access to a certain folder to admin logged users onlyHi,
Thank for your fast answer, but thoses plugins are about restricting access to WordPress managed content (post-type, product, pages, API requests), is there no way to just block a folder?
I mean currently, if you tip https://mywebsitename.com/wp-content/my-folder/something.txt you’re able to open and see clearly what is in the something.txt file. I just want to prevent users that aren’t admin to see any file in this folder.
Also I don’t get why my threads are constantly moved in “fixing wordpress” section, if I asked it in the “Developping” section it’s precisely because I would have preferred a code approach and try to understand how it works rather than using a paid plugin.
I wanted to try them before solving the thread.
Unfortunately none of them were very adequate. The first one is a bit like using an hammer to kill a fly (that justify the annual pricing, but we had a small need), the second one doesn’t work properly.I finally build my own fee method based on this solution, with a little homemade plugin : https://stackoverflow.com/questions/26240591/add-a-fee-to-woocommerce-per-product-based-on-category
The
$woocommerce->cart->add_fee()
method is really helpful.Hope it can help someone else.
- This reply was modified 3 years, 9 months ago by Nox.
Hi,
Thank you maykato for your fast answer.
I’ll take a look.- This reply was modified 3 years, 9 months ago by Nox.
Forum: Plugins
In reply to: [Variation Swatches for WooCommerce] Disable zoom effect in product’s galleryFinally found out it comes from WC itself, and I had to force it, with a high priority.
function remove_image_zoom_support() { remove_theme_support( 'wc-product-gallery-zoom' ); } add_action( 'wp', 'remove_image_zoom_support', 100 );
Forum: Plugins
In reply to: [WooCommerce] Display “real” wordpress content of the shop/archive pageHi,
Okay, I didn’t think it will be a complex thing.
I’ll try to find another way to achieve my needs so.Thank you.
Forum: Plugins
In reply to: [WooCommerce] Split products loop by categories on the shop pageHi RK,
Thank you for your answer. Unfortunately, I may recommand that solution for some clients, but I can’t afford such extension for this particular project.
Using shortcodes may be a good and maybe more flexible solution. I’ll try to go with that and mark the thread as resolved.
- This reply was modified 4 years, 1 month ago by Nox.
Forum: Developing with WordPress
In reply to: Gutenberg custom blocksWow, though my question was removed. Someone edited the title without any warning…
I finally found some (dirty) ways to manage what I wanted to do.
So for my first question, I came accross this way : https://florianbrinkmann.com/en/display-specific-gutenberg-blocks-of-a-post-outside-of-the-post-content-in-the-theme-5620/ which will enable you to play with the content output. I splitted the render of the block depending on the blocks name, so I can render two or more outputs (as string) in different containers of my page template. But obviously be careful with this way if you’ve other extensions that already manipulate the content or their filters.
And for the second one, I finally changed the default content directly using the
default_content
filter.
Fortunately this last one work with blocks, but don’t forget to check if the current editor mode is well Gutenberg. CF : https://wordpress.stackexchange.com/questions/348426/how-can-default-content-filter-tell-if-content-will-load-in-block-editor-or-clas then you can pass a block as a comment in a string (as it is written in your database).Hope it will help.
Forum: Developing with WordPress
In reply to: Gutenberg : allowed_block_types filter isn’t working at allOkay I see. Thank you for your help !
Forum: Developing with WordPress
In reply to: Gutenberg : allowed_block_types filter isn’t working at allHey Leslie.
Okay, so it worked with this trick, but I still can’t understand why it can’t check if the current $post is the front page or not through the
is_front_page()
function.You’re trying to to pass a specific page rather than a post type, which is why it isn’t working.
Actually the $post in parameter remains the current page you’re editing, I’m not passing something else. Does the query in the
is_front_page()
cause conflict ?Thank you anyway for the first advice.