Jonathan Bossenger
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Disable “auto embed” feature when pasting text and linksHi @mathse it should be possible to do this, by removing the
transforms.fromproperty of thecore/embedblock.To do this, you need to use the
registerBlockTypefilter in JavaScriptThis is what the JavaScript code would look like (tested on a local site with a custom plugin)
function filterEmbedBlock( settings, name ) { if ( name !== 'core/embed' ) { return settings; } settings = lodash.omit(settings, 'transforms.from'); return settings; } wp.hooks.addFilter( 'blocks.registerBlockType', 'jonathanbossenger/create-block/todo-list', filterEmbedBlock );You’ll need to build this into a custom theme or plugin, and enqueue the JavaScript using the
enqueue_block_editor_assetshookhttps://developer.wordpress.org/reference/hooks/enqueue_block_editor_assets/
I would also point out that this might have an affect on other functionality for the embed blocks, but it will disable the auto embed functionality.
- This reply was modified 4 years ago by Jonathan Bossenger.
Forum: Fixing WordPress
In reply to: Gallery Image Link Not WorkingHi @winediplomats ok, so you’re using the original gallery option in the Classic Editor.
I’ve recorded a quick screencast creating a gallery on a local test environment.
https://www.awesomescreenshot.com/video/8820015?key=4137028bed16849762b94c77e73376ba
When I create the gallery, the only linking options I see are the ability to link the gallery items to the Attachment Page, the Media File or None, but no option to link to any external pages.
Do you have some customisation on your site that enables this option?
If you need help with querying ACF data, I recommend asking on the ACF support forum (https://support.advancedcustomfields.com/) so the plugin’s/theme’s developers and support community can help you with this.
Forum: Fixing WordPress
In reply to: wp.api.models has no models in itHi @codasaurus
Are you able to share the code you are working with, and how you are trying to use wp.api.models? Perhaps some example code you can share, that will help me understand your use case.
Forum: Fixing WordPress
In reply to: 5.9 custom global css in block themeHi @rand
Generally it’s recommended to use a child theme, which allows you to enqueue a style sheet, which will apply any custom CSS to it’s parent theme
https://developer.wordpress.org/themes/advanced-topics/child-themes/
Forum: Fixing WordPress
In reply to: What else could be controlling my Server’s PHP Memory Limit?@skredlemon I just did a check online, and master value is what is set in the php ini file, and the local value is what would be set either in .htaccess, or another Apache related configuration file.
You mentioned earlier that you checked your .htaccess file, and the same values are set, perhaps it is set in another Apache related configuration file?
Forum: Fixing WordPress
In reply to: What else could be controlling my Server’s PHP Memory Limit?@skredlemon I know you mentioned that your site is hosted with cPanel. cPanel is web hosting software, typically installed on a server by a web host. Do you have a web host company that you are paying for your web hosting, or is this a server you manage yourself?
@hifriend I’m going to be digging into this issue a little more today, and I wonder if you could help me get a bit more info about your site.
If you feel comfortable sharing this info, could I ask you to browse to the Site Health screen in your WordPress dashboard (Tools -> Site Health) and clicking on the Info tab.
Then use the Copy site info to clipboard button to copy your site info, and paste it as a reply here.
Forum: Fixing WordPress
In reply to: [NSFW] missing layoutHi @dominote
When I visit the site now, I can see the page content, (which I can’t screenshot here, as you’ve pointed out, it’s adult related content) but I’m at least not seeing a white screen as I did before.
I am seeing in the console that two images are not found in the location specified, and therefore not loading, but the main layout seems to be working now.
It’s possible your browser had just cached the version before you reinstalled the certificate?
Forum: Fixing WordPress
In reply to: Gallery Image Link Not WorkingI assume you are adding the link by clicking on a single image in the gallery, clicking on the link icon in the tool bar, and adding the link that way (see attached image)?
https://www.awesomescreenshot.com/image/26853232?key=6493611c9a84fce4eb1acd0beb8240aa
Currently your first image is linking to https://winediplomats.com/img_20220422_202943489-1/, which is the URL to an image in the media library.
Thanks @oriver I did a search on the plugin repo for Code Snippets and there were a few results, perhaps you could point me to the correct one?
Forum: Fixing WordPress
In reply to: How can I achieve this in custom post type?Hi @nielfernandez I don’t think there is a hook in place to do what you want, which is why I shared the code in the above reply.
You could very well do it using JavaScript. If you inspect the HTML that makes up the menu of a custom post type, the list item that contains the custom post type menu has an id in the following format
menu-posts-{slug}where slug is the slug of your custom post type.However, to achieve this you would probably need an admin-ajax action that calculates the total custom post count, and then the JavaScript which triggers when the menu is loaded, gets the value from the admin-ajax action, and inserts the relevant element into the menu.
Forum: Fixing WordPress
In reply to: Problem with postning postHi @lena10
It’s possible that something in your theme, or an installed plugin, is causing this.
Are you able to disable all plugins, and use one of the default (Twenty*) themes.
If the problem goes away, enable them one by one to identify the source of your troubles.
Thanks @oriver that does help.
Can you let me know how this is implemented in the WordPress site, is it via a theme or a custom plugin?
Forum: Fixing WordPress
In reply to: How to Edit html css code using VScodeHi @jdev24
If you want to customise your WordPress theme, you’re going to need to create a child theme. In the child theme, you’ll need to determine the file from the parent theme that outputs the header content, make a copy of that to the child theme, and edit the copy in the child theme.
You can read more about how child themes work here.
https://developer.wordpress.org/themes/advanced-topics/child-themes/
It might also be useful to reach out to the theme developers of your current theme, as they might be able to assist with which file needs to be copied and edited.