Alkorr
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Exclude Pages From Insert/Edit Link ListI’m sorry to post again but I thought maybe the code I copied in my previous post would help someone find a solution to my problem.
I searched again through the WP Forums and the web but I couldn’t find any suggestion to solve my problem. I hope someone will read this thread and think of something <:)
Thanks!
Forum: Fixing WordPress
In reply to: How to Define Media Upload LocationThank you very much George for your answer and the link I’m gonna check right away! 🙂
Forum: Installing WordPress
In reply to: Download WordPress PHP Errors in wp-config.phpHi Steven, thank you! I asked because I checked the other (older WP version) wp-config.php and there is a
?>in all of them. So fine, I won’t close it!As for the missing parentheses in the file, I will add them then. Thank you very much! 🙂
Forum: Fixing WordPress
In reply to: Exclude Pages From Insert/Edit Link ListHi, I found this code to exclude pages from WordPress Search, I guess it could work to exclude Pages from the Insert/Edit Link dropdown menu but that’s as far as I can go since I don’t code at all… If this is useful to anyone to help me on that matter. Thank you!
if (!is_admin()) { function nopages_search_filter($query) { if ($query->is_search) { $query->set('post_type', 'post'); } return $query; } add_filter('pre_get_posts','nopages_search_filter'); }Forum: Fixing WordPress
In reply to: Exclude Pages From Insert/Edit Link ListHi mrtom414, no plugin, nothing, only a genuine WP install 🙂
When you write a post (not using Gutenberg) you can select some text and click on the Insert/Edit Link icon above the text area. If you click on the Link Option gear icon (right) then a list appears with recent published posts you can add as link. I want to exclude recent published pages to appear in this list. There must be some code to add to the functions.php but I don’t know where to start (I don’t code at all…).
I hope it helps, thanks!
Hi, again thank you for being so thorough in your reponse, much appreciated. This issue is not showing anymore since the last 4 days and I don’t know why, but it seems to be gone. If it ever happens again, I’ll disable YOAST SEO and I’ll let you know if the issue persists.
Hi, thank you for the explanation, I understand better now. I waited a couple of days before replying to check if it was a recurring error. It did happen twice since I posted my message, but not anymore, so far. I read the page you mentioned and since you say this is an error that does not influence my site rank, I’ll check from time to time if it happens again. Thanks again for your reply 🙂
Forum: Plugins
In reply to: [Contact Form X] Help Tab MissingShame on me, I had disabled the Help Tab… Thank you for your patience! 🙂
Forum: Plugins
In reply to: [Contact Form X] Check if function existsThank you very much! 🙂
Forum: Plugins
In reply to: [Contact Form X] Remove ‘Reset Form’ ButtonIt works fine, thank you Jeff! 🙂
Forum: Developing with WordPress
In reply to: Allow uploads to specified file types by rolesOk, I think I found what was missing regarding the mime type string. I also changed current_user_can for an array:
add_filter('upload_mimes','restrict_mime'); function restrict_mime($mimes) { $mimes = array( 'jpg|jpeg|jpe' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png', ); if ( ! current_user_can( array( 'editor', 'administrator' ) ) ) { $mimes = array('mp3'=>'audio/mp3', 'audio/mpeg3', 'audio/x-mpeg-3'), } return $mimes; }I hope this one works better 😉
- This reply was modified 5 years, 10 months ago by Alkorr.
Forum: Developing with WordPress
In reply to: Allow uploads to specified file types by rolesHi Steven, thank you for your reply! In fact I don’t code at all but I’m trying 🙂
Here is what I tried to do following your advice but I’m afraid it doesn’t work. It may seems easy to you but please be indulgent:
add_filter('upload_mimes','restrict_mime'); function restrict_mime($mimes) { $mimes = array( 'jpg|jpeg|jpe' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png', ); if ( ! current_user_can('administrator,editor') ) { $mimes = 'mp3', } return $mimes; }Thanks again!
Hi Michael, I’m using the latest version of WordPress 5.4.2 and Yoast SEO for WordPress 14.3. And no, I’m not running the premium version of Yoast SEO.
I found some code to use filters in the functions.php file:
function http_request_force_ssl_verify( $args )Is it something you would recommend to use?
Forum: Developing with WordPress
In reply to: Remove the lost password url (login page) Direct LinkThank you very much, I changed for the new code following your link and now it works fine! 🙂
Ok, I found the problem, it was an Option in Firefox… Just in case, beware of FF latest update.
Sorry for the bother, topic closed!