All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
507 views

Automating svn updates from a server-side cron job

I am running WordPress on Ubuntu with Apache and MySQL. I would like to automatically install minor and security updates to WordPress. However, as I understand it, the standard auto-update ...
0
votes
0answers
5 views

post count not reflecting pre_get_posts action

please can someone help me out! I'm using a plugin to create a widget for a custom post type archive which is showing in a sidebar. I then added a function to further filter the results using ...
0
votes
0answers
41 views

Error from Wordpress widget popular posts after updating to version 5.5

Today Wordpress updated to 5.5, the problem is when I open editor, while loading it shows me this error Notice: register_rest_route was called incorrectly. The REST API route definition for wordpress-...
0
votes
2answers
273 views

How to bulk delete a certain part of all wordpress posts

site been hacked, and all posts been injected a line of js code under the content! <script src='https://js.xxxxxxx.ga/stat.js?n=ns1' type='text/javascript'></script> I have found the ...
0
votes
0answers
21 views

How to pass multiple values in a form for tax_query?

I am trying to create a form that allows users to view only specific posts. I have a custom taxonomy that has two parent categories, "Category" and "Age". The form has two filters ...
0
votes
1answer
10 views

How to use update_post_meta() function properly?

So I am working on a something like a plugin in my custom wordpress theme, and and in an options page I have a form whose action is the php file _options.php, in normal manner some data will be sent ...
0
votes
2answers
511 views

How to add pagination to a post loop in a custom BuddyPress tab

I created a new tab called "Videos" inside of the BuddyPress Profile page. This tab contains all video posts added by that user. The problem is that it only shows the first 12 posts and the pagination ...
0
votes
0answers
6 views

Can I insert ACF repeater fields into MaxMegaMenu via JS?

I have to add a Slick slider with ACF repeating fields to MaxMegaMenu, unfortunately I don't know how to add such a large piece of code via Javascript (passing js Var?). Has anyone tried to add ACF ...
0
votes
1answer
10 views

Disable wordpress update notification

i need a code to paste in my wordpress theme function for disable wordpress update notification. https://prnt.sc/tyigt3
0
votes
1answer
14 views

Get specific values in Woocommerce Rest API

If I used /wp-json/wc/v3/products I am getting all products, but what if I want to receive only price and quantity, I searched all we web and couldn't find it!
0
votes
1answer
3k views

How can I import an excel column into wordpress database?

I have an excel column with around 1000 values, i need to import all these values into my wordpress database so i can create a small form with a text input and a submit button to let the users to add ...
0
votes
1answer
19 views

How to authenticate via API to allow writes/updates

I've been working with the Wordpress REST API Authentication plugin (from miniOrange) as part of an article I'm writing. I want to demonstrate how to integrate a third-party application with a WP site ...
0
votes
1answer
1k views

Inline Editing with wp_editor and tinymce (problem with textarea)

I want to use the new inline editing from tinymce with the wp_editor function in wordpress. Here is some info on how to set up tinymce inline editing http://www.tinymce.com/tryit/inline.php The code ...
0
votes
0answers
7 views

How do I migrate blog post images from one domain to a new one?

The conflicting articles I am finding on the web are leaving me more confused... :) For backstory, I work for a company that has been acquired by another. I am now tasked with moving all the blog post ...
0
votes
0answers
6 views

Charge by most expensive variation

how are you? I use a WooCommerce on a Pizza Order Form and I have defined 2 attributes, "flavor 1" and "flavor 2" and I need to charge for the most expensive variation, regardless ...
0
votes
0answers
29 views

WordPress Multisite: Redirects users after login to the site's admin dashboard they belong to

I want to let the users log in through the main site(www.example.com/wp-admin), Once the user successfully logged In, I want to redirect them to the site admin(ie: www.example1.com/wp-admin/index.php)...
0
votes
2answers
22 views

Display latest posts from a specific categories

I am trying to get latest from specific categories (3 posts), but the code does not seem working. Instead of displaying posts from the mentioned categories, it is displaying posts from the first ...
0
votes
1answer
4k views

Action hook “wp_insert_post” works but not for last imported post

I want to run a custom function whenever posts are imported to my custom post type. I am currently running this code - function on_post_import($post){ global $wpdb; $results = $wpdb->...
0
votes
1answer
18 views

WordPress Gutenberg How to make TextControl Required?

I want to make this field required. Can anyone suggest how to do it? <TextControl tagName="p" label="url" placeholder="http://" focus = {focus} ...
2
votes
1answer
1k views

Custom HTML structure in wp_list_categories

I am trying to accomplish an Ajax navigation for the categories and for that I need the code to look something like: <ul> <li data-level="1">Parent Category</li> <li data-...
4
votes
3answers
12k views

How to set limit only on top levels of wp_nav_menu?

How can I set a limit to the top level menu items in wp_nav_menu? Example: I have this menu in my admin dashboard: I would like to count ONLY the top level items and display a limited number of ...
2
votes
1answer
168 views

Dynamic gutenberg block with react instead of php

i'm building a wordpress theme based on the wordpress rest api, So everything on the frontend is built with react. But I want to build a gutenberg custom block that displays the most popular posts. is ...
0
votes
0answers
8 views

Custom Admin Page equivalent to Posts page with custom meta values

I'm creating a custom admin page for CPT (Custom Post Type) in WP-ADMIN returning posts with their taxonomy that should like Posts List Page I am able to display list of posts for a given category, ...
0
votes
1answer
45 views

Display User ID instead of Name or Username

I have BuddyPress installed in my WordPress. I don’t want to display the name or username in the profile of member, instead just User ID, like below Avatar instead of member’s name it will just show ...
2
votes
2answers
703 views

Wordpress generating 404 on .mp4 file in theme folder

I am trying to load a full width video on my homepage. My situation is almost exactly like: Video Background - (php & css) - generating 404 error on page load - Wordpress Theme File Structure ...
3
votes
2answers
2k views

widget should display post archive by year and on click also by month

I want to display the post archives like seen in this picture. Shown by year and on click it should open up the months. I am not sure how to approach this, would you customize the standard WordPress ...
0
votes
0answers
5 views

How can i update custom image fields through the rest API

I want to have a gallery with clickable images on my site that will redirect the user to an external website. To this end i have installed the plugin "Gallery Custom Links" which adds custom ...
1
vote
2answers
31 views

Auto Plugin & Core Updates Not Working For Custom Theme

I have a custom WordPress theme I've developed and have included the following lines in my wp-config.php in hopes to automate plugin and core updates: define( 'WP_AUTO_UPDATE_CORE', true ); add_filter(...
1
vote
1answer
3k views

Get WooCommerce shipping methods programmatically

How can I retrieve the shipping methods in my WooCommerce shop? I have this on my checkout page: And inside my admin it looks like this: I have tried doing: WC()->shipping->...
0
votes
1answer
55 views

Parent category as WOOCommerce Categories widget title

I'm really not a developer, but this is something I expect not to be too hard to achieve :-) I really don't know where to start, so that's point 1. I read all of the topics about dynamically changing ...
2
votes
1answer
16 views

Prevent changing the length of post_name column on WordPress Update

We've some Arabic websites running on WordPress, and use Arabic slugs in the posts' URLs. You know that post slug is stored in the post_name column in wp_posts table, and the default length of this ...
22
votes
6answers
18k views

Is it possible to change the log file location for WP_DEBUG_LOG?

I use WP_DEBUG_LOG in my development environment and have no issues with debug.log being in the wp-content directory. Sometimes I turn on WP_DEBUG in production when I need to debug something, and I ...
5
votes
4answers
58k views

Error: call_user_func_array() expects parameter 1 to be a valid callback

I have issue after upgrading my wordpress to 3.6 see below for errors which displays on wordpress admin panel not on front of website. Warning: call_user_func_array() expects parameter 1 to be a ...
1
vote
1answer
27 views

URL Rewriting for PHP script on an image URL

I built an image randomizer so that when I open a .php file in a URL that it displays the image with readfile($randomImage);. This works locally but when I upload it to the server it gets blocked by ...
0
votes
2answers
30 views

Updating the_post content is only working with Twenty Twenty theme

EDIT: Thanks to @mozboz I've got a solution to this. The post has been updated to reflect was I was originally trying to do, and what I am doing now. I am developing a plugin that creates a custom ...
-2
votes
0answers
13 views

search result page shows product in a messy way [closed]

my website doesn't show results in a proper way after searching products website link: www.click.af Here is the error log 2020-08-12 20:27:27.459869 [INFO] [8267] [188.114.111.75:58032#APVH__wildcard_....
0
votes
1answer
542 views

Requiring Once into plugin PHP File not working

I am trying to get a php file to input content into the wordpress database under a specific table. I have set up the table and have verified that the information is passed into the insert.php file. ...
0
votes
0answers
17 views

“Class Not Found” in HTML Form Target PHP File that contains the class

How do I make the HTML form's action target file 'aware' of classes that WordPress has already loaded? File A -> Creates a WordPress shortcode that inserts a form that has 'File B' as the target. ...
0
votes
2answers
4k views

Magnific Popup - Add Caption to Images

My theme uses Magnific Popup as follows in theme.js /* add lightbox for blog galleries */ $(".gallery a[href$='.jpg'],.gallery a[href$='.jpeg'],.featured-item a[href$='.jpeg'],.featured-item a[...
1
vote
1answer
22 views

Register multiple styles / scripts in register_block_type

I use following code to register my Gutenberg Block: register_block_type('create-block/myblock', array( 'editor_script' => 'create-block-myblock-script-editor', 'script' => 'create-block-...
7
votes
5answers
8k views

WordPress auto login after registration not working

I looked up a bunch of threads trying to figure out how to automatically log a user in after registration, and came up with this. function automatically_log_me_in( $user_id ) { $user = ...
0
votes
0answers
13 views

How to set template type on post created with a particular taxonomy?

I have a plugin that automatically converts Contact Forms to Post. I made sure that all the posts submitted by this plugin contain a particular taxonomy. Category: "Discussion nuggets". I ...
7
votes
4answers
15k views

Post featured image column on admin post list page

I have a client site which accepts images from users as posts. For moderation, we are opening each draft post which obviously takes a lot of time if a hefty amount of images are moderated. So, Is ...
22
votes
6answers
107k views

How to Add Custom Fields to a Custom Post Type?

Ok, so I have registered a few custom post types and a few taxonomies. Now, for the life of me, I cannot figure out the code I need to add a Custom Field to my Custom Post Type. I need a drop down ...
0
votes
3answers
767 views

WooCommerce Custom Tab with ACF Repeater Field

I am using a Repeater of Advance custom field for the content of the my additional custom WooCommerce Tab. The repeater is inside a group field. I manage to display the custom fields that is outside ...
1
vote
0answers
5 views

How to handle autoloading with composer by keeping the WordPress naming conventions?

I'm a bit confused because I'm programming a plugin for WordPress by using composer as it's the real way to go. So I've created a composer file inside my plugin and some other stuff. In the composer ...
-1
votes
1answer
11 views

CSS Full screen not working properly

CSS issue ! I tried to get custom CSS working to get full screen working. The code works on my Macbook when when I watch the site on my iMac it doesn't work. The website is https://jasmijnbult.nl I ...
0
votes
0answers
7 views

Allow users to change their role except for the roles I choose

This function displays a check list and allows all users to edit their user role/s to any others in the backend user profile backend, including admin etc. How would I exclude certain roles from the ...
0
votes
1answer
21 views

wpdb->query returns different value to phpMyAdmin

I am trying to build a shortcode that will query a db and sum. Here is what I have so far: function my_plugin_name_count_people() { global $wpdb; return $wpdb->query ("SELECT COALESCE(SUM(`...
1
vote
1answer
1k views

Filter custom post types by a field value

I have custom post type of an animal type. (I.E I created an animals collection). I want to give the user a drop down to select the gender and filter the displayed custom post types entries ...

15 30 50 per page
1
3 4
5
6 7
2105