All Questions
115,461
questions
0
votes
0
answers
3
views
How to pass a user_id to a custom plugin
This may not be the best way to do this.
The client needs to be able to enroll users into custom courses that's defined in another post_type. I can't find any documentation that allows me to add a ...
0
votes
0
answers
6
views
Failed PHP 8.0 Upgrade
We are talking about a website which is used not very often. Today I mentioned that we are running an old PHP-Version. So I logged into my provider's control panel and adjusted PHP.
Afterwards I had ...
0
votes
0
answers
7
views
Fetch and Diplay latest 3 Nextgen Gallery added [closed]
I am using NextGen Gallery v 3.54 on my site.
I would like to fetch the latest 3 galleries added and show a link for each one in the homepage.
I am pretty sure it can be done usind php and shortcode.
0
votes
0
answers
32
views
Data insertion after clicking a button does not work (script, AJAX, PHP)
1 - the button "Choice" has Id "ButtonPubVideoHdp" in Elementor
2 - the file wp-content/themes/generatepress/js/wp_ajax_calls.js manages the click and calls
in the file wp-content/...
0
votes
0
answers
12
views
Best practice for Wordpress media image use
I'm considering using my company's Wordpress website as a place to upload images (to media) and use the WP URL to link images on the company's email signature.
Mainly so I have a URL to use on the ...
0
votes
0
answers
18
views
htaccess file prevents js scripts to run
In my WordPress website whenever the htaccess file is added to my public_html folder, I have so many errors in my js files. for example:
Uncaught TypeError: gform.initializeOnLoaded is not a function
...
0
votes
0
answers
13
views
Overwrite WordPress Plugin Class Function
I just want to customize the inline style of the div-element. The function looks like this:
class class_eqw_product{
//other code here
function add_loop_enquiry_button() {
global $product;
...
0
votes
0
answers
4
views
Wordpress - Post views stopped updating on backend
As per the title post views have stopped updating on backend, no changes were made to core files, or theme updates etc when this happened.
I have installed a post views plugin since, which works fine.
...
-1
votes
0
answers
6
views
AggregateRating and user overview on woocommerce archive page
so basically i saw some websites on google results that they have Aggregate Rating schema for woocommerce archive page.
they also have comments on each archive page. im trying to create something like ...
0
votes
0
answers
16
views
Want to call shortcode after every blog post title automatically
i want to call shortcode after every blog post title automatically. It's a search box which already using on pages when i place the shortcode, now i want to add it on my 500+ posts once, is there any ...
0
votes
0
answers
19
views
Custom database table entry edit page
I can display every row of a custom DB table in my custom sub page, but I'm not sure how to implement a single row edit page. Is it as easy as verifying some link query parameter and then displaying &...
0
votes
0
answers
17
views
Javascript function defined in view.js not reachable from save.js
I am trying to develop a custom gutenberg block.
I have a form in save.js:
export default function save() {
return (
<div {...useBlockProps.save()}>
<form onSubmit={...
0
votes
0
answers
3
views
numpy insert seems to be replacing [migrated]
I am trying to write a simple program that adds some lines to a file. To do this I am using numpy insert. For some reason, this seems to be replacing a row rather than inserting one. what am I doing ...
0
votes
0
answers
11
views
Search posts by meta key in admin and front
i want to search post by meta key and title. but when i use blow code search just meta key. how can i solve that?
function extend_admin_search( $query ) {
$post_type = 'post';
$custom_fields = ...
0
votes
0
answers
12
views
Media Library Issues
(All plugins disabled) I have some strange issues with the media library. It's an old site that I have been managing for the last 2 years. The site has dated media folders on disk going back to /2010/...
0
votes
0
answers
29
views
How to cache results of of get_available_post_statuses() function as it is causing a slow query on a website with over 1 million posts?
The function get_available_post_statuses() is being called by WP_Posts_List_Table->prepare_items(), which is calculating posts on each load of admin.
Since this is a core wordpress function and I ...
0
votes
0
answers
28
views
What triggers WordPress automatic updates? (revisited)
I'm trying to ascertain what triggers WordPress automatic updates. (focusing core-updates for now, not plugin/theme at this time.)
How To/What triggers a Wordpress auto update?
The 8 year old question ...
0
votes
0
answers
15
views
How to make query loop block dynamic
I am looking for a tutorial to figure out how to set the query loop block to get its category from the post it is in so I only set it in single post template not in every post I wanna create. Is that ...
0
votes
1
answer
50
views
Wordpress Insert line in DB when clicking a button
when clicking buttonHdp, I wold like to launch the php code in order to insert a line in DB.
Script
<script>
document.addEventListener('DOMContentLoaded', function() {
jQuery(function($){
...
0
votes
2
answers
25
views
How can JavaScript code be added before the closing HTML body tag?
how can i Add the code to my site before the </body> closing tag?
code is
<script> (function(w,d,u){ var s=d.createElement('script');s.async=true;s.src=u+'?'+(Date.now()/60000|0); var h=d....
0
votes
0
answers
6
views
Get FontSize from the InspectorControls Standard Control (typography.fontSize)
I have developed a block and am now trying to determine the size of the font based on the selected FontSize in order to be able to further use this value for calculations.
The font size is selected ...
0
votes
0
answers
9
views
Get featured image thumbnail and inserting into custom field on wordpress posts
I'm not a developer so trying to put this together has not been successful. Hope someone can assist!
My goal - create a custom field on a wordpress post when a post is published or updated which ...
0
votes
1
answer
15
views
Can't access my site, getting 'There has been a critical error on this website. Please check your site admin email inbox for instructions.' message
my site is https://christinacreative.co.nz and I can't access it at all. Yesterday, It sent me an email for the recovery mode but the link has expired and Its not sending me another email to get back ...
0
votes
0
answers
7
views
Adding the portfolio category to the body_class on the portfolio detail page
While on the portfolio detail page, I want to add the category of that portfolio to the body_class, but none of the solutions I found on the internet have worked. I believe it's related to the ...
0
votes
0
answers
9
views
TypeError when editing new page or post
The site in question is running WordPress 6.4.2, PHP 8.1. I am getting this error when I attempt to edit a new page or post:
TypeError: l(...).sortable is not a function
at Object.init (...example.com/...
0
votes
0
answers
19
views
How can I make wp-json authentication work over https for development only?
I set my WP_ENVIRONMENT_TYPE to 'local' so that I could create an application password, but I cannot use this password to authenticate against the api. I cannot figure out whether it's possible, and ...
0
votes
0
answers
22
views
Custom plugin translation not working
I made a plugin that contains 2 custom gutenberg blocks created with react and jQuery (for some front-end stuff) and I'm having troubles translating them. There are no translation strings inside the ...
0
votes
0
answers
25
views
Call to undefined function create_function() - PHP 8.2
My wordress plugin is giving some issue. I am using 8.2 PHP version but the plugin is very old.
define('BBP_BBCODE_PATH', WP_CONTENT_DIR.'/plugins/'.plugin_basename(dirname(__FILE__)) );
//Admin ...
0
votes
0
answers
12
views
How to remove image from starting of wordpress blog post?
When I am selecting feature image for any post of my wordpress blog then unexpectedly a full width image is whowing starting the blog post. If I removing the feature image only then the image is ...
0
votes
1
answer
14
views
why same category base and single post base don't work?
I have checked a similar question on the site but there was no satisfactory answer? Here is what I would like to accomplish.
When I set the permalink structure to '/blog/%postname%/' this gives me the ...
0
votes
1
answer
12
views
WordPress REST API custom endpoint not allowing multiple parameters
I've made a custom endpoint for my REST API:
add_action( 'rest_api_init', function () {
register_rest_route( 'foo/v1', '/bar/', array(
'methods' => 'GET',
'callback' => 'foo_callback',
) ...
0
votes
0
answers
10
views
Child sites are slowly loading images from main site (main site is super fast)
We have an un-solved (and very large) speed issue with this site: https://micronordic.com/dk/ and all other 26 child sites on the http://micronordic.com/ domain.
The child sites are loading the images ...
0
votes
0
answers
14
views
Image is cropped on the "wrong" side [closed]
I have two containers side by side in Elementor & inserted an image with "background overlay" on the left side.
When I resize the browser window, the image on the right is cropped. But I ...
0
votes
1
answer
53
views
Automatic short URL in posts
I have a domain for (maindomain.com) which my site is running on it, I want to automatically add short URL at the end of each post.
1- I want to use another domain for short links
2- I want to have ...
0
votes
0
answers
20
views
wc_get_template_part filter not working
I am trying to replace the content-single-product.php template file from within a plugin. I am trying to use the wc_get_template_part filter to replace the content however the filter just doesn't seem ...
0
votes
0
answers
13
views
WP_Query filtering in ACF field containing dates
I'm trying to use WP_Query to filter Advanced Custom Fields posts that can contain this value in the "dates" field (text type), for example "20230101-20230102;20230201-20230202;20230301-...
0
votes
0
answers
14
views
How to remove https://pixel.wp.com/t.gif g.gif from loading when use plugin WooCommerce [closed]
Everytime i active plugin WooCommerce.
It will slow down website, i debug it and it show 2 link is reason.
https://pixel.wp.com/t.gif?completed_tasks=2&total_tasks=5&_via_ua=Mozilla...
https://...
0
votes
0
answers
19
views
Is it possible to pass dynamic data from a parent dynamic block to descendant dynamic block via context?
I know that in WordPress it is possible to create dynamic blocks in PHP which can, among other things, gather data from external APIs to collect data needed to render them. I also know it is possible ...
0
votes
0
answers
15
views
Polylang: How to make detect browser language works on all pages? [closed]
I need to make links on the site redirect to the language version
"Detect browser language" option in Polylang settings allows me redirect only homepage, but i need to do this for all pages
...
0
votes
1
answer
35
views
WordPress PHP8.2 Critical Error in class-wp-widget.php
Recently updated to PHP8.2 and I'm getting a critical error related to the theme.
The critical error is:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function WP_Widget::__construct()...
0
votes
0
answers
26
views
How can I filter records in a custom post type list in the admin based on the ACF field in the post that contains the current user?
I have a custom post type called Projects that includes an ACF field named team_members which uses User as a field type and returns a User Array. I want to filter the post type listing so that the ...
0
votes
0
answers
10
views
Add custom text in /post.php?post=503&action=edit
I'd like to know how to add a custom text like "Hello world!" inside the edit post.
0
votes
0
answers
14
views
Child theme removes the "id=" from main theme
i have a problem with child themes on wordpress, and the problem it seems is from wordpress because i have it on every wordpress site.
I use wp blocks and table of contents, if i use the main theme ...
1
vote
1
answer
428
views
Stiff-necked themes
Site health alerts that I should remove inactive themes, but every time I update WordPress, the default themes are automatically installed again. How do I get rid of automatic twentywhatever themes ...
0
votes
0
answers
6
views
Site Library issue
How can we use this site library template for a single page ( blogs page where we fetch and display all the blog posts ) without affecting the website theme or pages.
and how to connect with ...
0
votes
1
answer
11
views
Cron Job not working
I am trying to trigger a function using cron job in a time interval of 1 minute but it is not working, am I missing something?
register_activation_hook(__FILE__, 'my_event_recurring_activation');
...
0
votes
1
answer
17
views
Site logo not showing, no home page
My site logo is uploaded in the theme customizer, and I can see it on all of the pages when I'm previewing the site in the customizer. But it doesn't show on the live site. I read in one of the ...
0
votes
1
answer
30
views
Post archive is not using the assigned template
Background:
In a custom theme's Settings > Reading > Posts page, I have designated all posts to be output on a page called "News and Events"
I created a new page which is blank except ...
0
votes
0
answers
13
views
Need to add custom cart item data
I need to create custom elementor product carousel. From that carousel there is a date field. User can select date and add product into cart. The selected date will be displayed as 'preferred date' ...
0
votes
0
answers
14
views
WordPress site showing e-commerce icons on footer [closed]
On my mobile version of the site www.wvetclinic.com
On footer its showing e-commerce icons.
I disabled anything related to commerce like WooCommerce and all realted plugins
How to get rid of those ...