I'm using Complianz to manage trackers and scripts on my WordPress site, but its CSS scripts are render blocking my home page. I was able to dequeu the main stylesheet using the following snippet: // Dequeue the Complianz general CSS file on the front page function force_dequeue_complianz_general() { if(is_front_page()) { wp_dequeue_style('cmplz-general'); wp_deregister_style('cmplz-general'); } }…
I'm using the Elementor V4 Atomic editor (Elementor 4.2.1, Elementor Pro 4.2.1) on a single-site WordPress install. When I select an Atomic element, open the Style tab and type a new class name, the dropdown returns: Sorry, nothing matched "content-wrap". With your current role, you can only use existing classes. I am logged in as a full Administrator. current_user_can('manage_options') and…
I thought about asking this in the Webmaster Stack Exchange, but it seems to be as much a WordPress question has anything, I think. Thanks for any help anyone can extend. I'm seeing a lot of traffic to the oembed links /wp-json/oembed/1.0/embed on my WordPress site by AI bots. I can't tell for sure, but are these Ai bots grabbing my content via oembed rather than going to the actual page URL? What…
I noticed that almost all the plugins I installed load the css and javascript in the head of all pages, even those where the plugins are not used. I think this is slowing down the loading of pages on my site a lot. Is there a way to disable this thing? if so, how do you have a plugin to recommend or should I use the code?
I'm working on this site and was asked to remove the pop up. I've tried entering classes like: .popup, .popup .popup-bg { display: none !important; } .popup { display: none !important; } The js files were also obfuscated according to the original developer when I asked him about it. He also recommended the above and it does work in inspect but not when I make the changes in the file editor. I also…
On WordPress checkout page, I want to make the "I have read and agree to the website terms and conditions" default clicked. Users can unclick the check icon. Is there any code available?
I'm trying to list posts from a CPT named "exposition" and group them based on a custom taxonomy called "date-exposition" (which are meant to be years such as 2010, 2015, 2017,...) in the following form : 2019 post 1 post 2 2018 post 3 post 4 etc... Closest code I managed to compile is this (it only shows one date/taxonomy-value and not the posts...) : <?php // Get current Category…
I installed a theme that gives you the option to install Elementor or Wp Bakery I chose Elementor. It does not matter how many times I delete the following keeps showing up "This theme recommends the following plugin: WP Bakery Visual Composer. How can I disable this? Thank you.
There are several threads on this topic, but none updated to Wordpress 5.8 The question is, in 2021 WP 5.8, what is the cleanest or recommended code to hide profile fields when creating/editing a user, except the basic ones (username,email,name,lastname...)? When I say "recommended" or "cleanest" I mean for example if there is something that can be removed "via hook", like the "Admin colour…
I hope this is not redundant - but there always seems to be enough different that I cannot get things working. I am building a function in my functions.php file - all other functions work fine. $query = $mydb->get_results("select * from table"); //This works just fine in mysql and I can do things like count(*) and get that to report back. But for whatever reason I cannot get the table to return…
I want to make an HTML form which will have an input field to fill in the ID of the user. Then I want to pass the value into a php code such that the email address associated with that user ID is displayed. However, I am new to WP and don't know how to do it correctly. I made a new php file in the root folder of my WP directory and put in this code and tried by browsing the file, but it didn't…
I've got a CPT of Inventory and I'm trying to show a dropdown of all Mfrs. I've got the form and pre_get_posts function so that when a user selects a Mfr, the page refreshes and shows only the inventory with that Mfr. THE PROBLEM: Once you select a Mfr. and the page refreshes, only that mfr shows as an option! No matter what I try (I won't post them all here because I have tried like 10 different…
Short: In Languages -> Settings -> URL modifications , the options "The language is set from the subdomain name in pretty permalinks" and "The language is set from different domains" are disabled. Why is this and how can I make these boxes selectable? I am particularly interested in the last option (different domains). Versions: Wordpress 5.5.1, Polylang 2.8.3 Background: My goal is a bilingual…
I create my websites on my PC using Xampp localhost. Then when I am ready, I upload to the server. That all works fine. I have a particular site that has been up online for several years, and all new edits to the site have been done online. Now, I want to get my local copy of the website to be exactly the same as the online one. (I need to do some local testing.) What is the best way to get my…
I want to track the number of button clicks in my coupon website. The button values are retrieved from custom fields created using the ACF plugin. I have a custom field total_clicks . Every time when someone clicks the button, I want the value of total_clicks to get updated. How can I implement this with ACF and javascript?
In the image below, I set the page Welcome! as my homepage. There is no link to that page, and there is only one way to go to the homepage: click on the banner. However, there is two different items referring to the homepage in the stat. Do you know what are the differences between them?
I want to display a fixed banner from the bottom left of the screen. But at the same time, the banner is different for desktops and mobile devices. Please tell me. How can I determine the user's device? For this, can I use the wp_is_mobile function? As I understand it, wp_is_mobile identifies the device by the user agent of the browser. PHP code is very simple. Something like the following? <?php…
I have moved a wordpress installation to a subdirectory, from var/www/html to var/www/html/wp-blog mainly to make it future proof. I have followed the instructions in the codex . My server is configured as such I have a nginx reverse proxy which directs calls to blog.mysite.com to the port 8080. Apache listens on 8080 I have modified the .htaccess from what is given in the codex and it is as…
I am trying to use the WordPress path URL in my js script file. I read here that I need to use wp_localize_script . But, I according to Codex's documentation wp_localize_script() MUST be called after the script has been registered using wp_register_script() or wp_enqueue_script() How can I do that? This is my function if(!function_exists('pt_scripts')): function pt_scripts () { wp_register_style(…
I have created a CPT UI and selected built in taxonomies "categories (WP CORE)". I have added some records and every time I add a category and main record, I want them to display in the main menu automatically after adding. Is this possible? Currently I have to manually drag them into position in the menus section.
I'm having trouble creating a staging site from an existing production site. When pulling media files using WP Migrate DB Pro 1.8.1 with the Media Files add-on v1.4.9, I can successfully populate my media library with the media from the original site, but for whatever reason all the paths are wrong - so pages with images pointing to /wordpress/wp-content/uploads/.../ cannot be found, because the…
I have a Custom Post Type 'Production' with 'Tourdates' as a repeaterfield (using Advanced Custom Field plugin). Tourdates have a 'Date & Time Picker 'field named 'Playdate'. I would now like to display (in a list) all Playdates of all Productions sorted chronologically. My current query displays the posts like this: 09/04/2017 (Production x) 28/12/2017 (Production y) 07/04/2017 (Production x)…
I am trying to save data in the default text widget. But when I click save, all the data are not saving and the field becomes empty. It happens when I edit in title field or text field. As I new to WordPress, I don't know the solution. I haven't installed any cache plugins. I haven't done any changes in functions.php or anywhere.
When I enable xdebug profiler , open a page in admin, it generates two cachegrind files with almost identical name cachegrind.out.1498219635_761795.crown__minilio_wp-admin_edit_php cachegrind.out.1498219639_141988.crown__minilio_wp-admin_edit_php The output name is defined as xdebug.profiler_output_name = "cachegrind.out.%u.%H_%R" I tried another page, got the same result. Why is that? Which file…
I'm new to WordPress, so I'm not really sure how it works, but I've been editing the theme by changing wp-content/themes/<theme_name>/css/style.css , then uploading this to the website via FTP. Here's the issue I'm having: From the Chrome Developer Tools, I can see that the style.css (the current file) is overwriting style.css?ver=4.6.3 . This means that even though I removed the border from the…
UPDATE : I've done some more research on my problem and have narrowed down the problem further. The question below has been very rewritten from the original. I'm trying set up a plugin to redirect ALL page requests - front-end, admin, login, etc - to an additional code validation page (whether that's advisable or not is moot, it's what the client wants). Based on the functions, hooks, and filters…
Is there any way I can automatically add a custom class to heading tags (like h1, h2, h3, etc..,) in the content area. I know that I can manually add a class to a sub-heading from the post editor, but I want the class to be applied to all the headings in all the posts. for instance, a normal heading will look something like this <h2>sub-heading</h2> . I want this to be changed to <h2…
I am trying to find a WordPress action hook that will allow me to access a new user's wp_usermeta information, immediately after the user has been created. In our registration process, custom fields are entered along with the standard WordPress user fields. So far, I've tried using the hook user_register , but that doesn't work. I sort of expected user_register wouldn't work, because its codex…
Is it possible to do this? In the codex the 'orderby' option does not allow manual ordering (only ascending ID, name, count, slug etc). Here is the code: <?php wp_list_categories('include=16,17,15&title_li=<h3>' . __('By Content') . '</h3>' ); ?> This is currently alphabetical since I havent included the 'orderby' statement. I want them ordered 17,15,16 but only these 3 cats which are not…
We have pages with urls like this: http://example.com/?page_id=3&user_id=5 http://example.com/?page_id=6&user_id=9 etc. page_id and user_id located in table MySQL Database. And this table has the below structure: ID, page_id and user_id If I know ID I can make query to database and get page_id and user_id . Question: how to make custom redirect? That user can use ID in short url like this…
my current search only shows POSTS as results. http://newslines.org/?s=george My site has categories for George Clooney, George R.R. Martin etc. How do I get a list of categories that match the search term to show at the top of the results page? I have tried this: <?php $search_query = get_search_query(); $term = get_term_by( 'name', $search_query, 'category' ); if ( !empty( $terms ) &&…
Is there a way to cycle through all existing, published posts on a WP site, that will replicate pushing the "update" button on every post one by one? This would be a one time event. I have a site with thousands of existing posts and there is no way I can go through and hit "update" on every single one of them. I've added a plugin that will display some new info on each post, but in order for it to…