All Questions

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

Populate select option with JSON file

I am having a problem with populating a select dropdown from a JSON file. I am modifying an existing plugin, and I want to include countries that we want to see to. The JSON FILE { "AX": { "...
0
votes
0answers
3 views

How do I edit the terms output args or array data?

This correctly prints the terms with images but the wrong order: <?php $terms = get_the_terms( $post->ID , 'wpsl_store_category' ); foreach ( $terms as $term ) { echo '<a href="'...
0
votes
1answer
2k views

Fatal error: Cannot declare class WP_User_Request, because the name is already in use?

Suddenly I am getting the following error on my website, I don't know why, these are the following errors shown on my website: 1)Fatal error: Cannot declare class WP_User_Request, because the name ...
0
votes
0answers
5 views

Query data after an Ajax insert

After a successful insertion with Ajax of an entry I would like to see what the ID and url of that same entry is and show it in a modal window Any way to get that data? <script> ...
0
votes
1answer
26 views

What's the most efficient way to preload multiple font types using links and enqueue?

I added some code to my theme to preload my self-hosted enqueued fonts that are coming in via @font-face. I then added a filter to set the attributes. Seems to work and the pages load a bit faster too....
0
votes
1answer
649 views

Importing demo data in Multisite

I have a multi-purpose theme, which allow to download complete demo site content/wordpress. Normally (www.example.com) it's perfect and run all demo request, last time i install a new wordpress ...
0
votes
1answer
9 views

Group Product Types

I am using Advanced Custom Fields and I am attempting to group together the custom post types with a similar value from a dropdown field. As an example. Other would-be its own heading and projectors ...
0
votes
1answer
715 views

Placing a featured image into header

How can I place featured images into the header, so each post has it's featured image within the main header? Also on category archive pages and the main news page, the featured images are being used ...
1
vote
2answers
2k views

$wpdb select all meta for each post

I'm running the following query trying to get the data and associated meta data of a huge number of posts: SELECT wp_posts.post_title, wp_posts.post_date, wp_posts.ID, wp_postmeta.post_id, ...
0
votes
1answer
742 views

Get a different size of Image thumbnail while working with custom metabox

I am using custom metabox for a page in my new project, I am using it for uploading image, and attaching it to the page. It's working fine, I can select image or upload the image using WordPress' ...
1
vote
1answer
842 views

Hyphens instead of Underscores in Post-type Archive Template Filenames when Post-type handle contains underscore

I'm working on implementing WordPress coding standards on a theme which has several custom post-types, each of which have underscores in their handles. The theme uses the custom post-type handle in ...
0
votes
0answers
5 views

How to delete all images from code in all post_content

In the past I occationally used this sql query to update links in post_content: update wp_posts set post_content = replace(post_content,'domain.org/Maries','maries.no'); I wonder if I could use a ...
1
vote
1answer
693 views

“The link you followed has expired” when previewing a post

Recently, I believe after switching to WP 5, non admin users are randomly getting the following error when previewing a post: “The link you followed has expired” . Please try again I am suspecting ...
0
votes
1answer
8 views

Gutenberg build error: You may need an appropriate loader to handle this file type SCSS

I had a plugin up and running with a scss to css compiler. Suddenly after I moved a few files into a better structure I get this error while building the block: ERROR in ./blocks/random-game/src/style....
0
votes
1answer
1k views

wordpress ajax pagination

I'm working on a WordPress Theme (create a custom theme) and using AJAX as pagination for my Custom Posts. So I'm going to load pages with AJAX but the problem is when I click for next page, instead ...
0
votes
0answers
5 views

How to remove font awesome from loading in wp theme

Question: How to remove font awesome from loading in theme and replace social icons with images? Theme Hueman - WP Multisite install What I did: In the functions.php of a child theme from Hueman Theme,...
1
vote
2answers
2k views

Text widget doesn't save the content

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 ...
0
votes
1answer
10 views

How to send a php var to jQuery Ajax call with two different file

I need to send a private e-mail address from a php file (page.php) to an Ajax Call in an other jquery file (sender.js). This e-mail address must be invisible to user/or website until the user get an ...
0
votes
0answers
5 views

how long do restored versions take to go live?

I just restored a page to a version from august of this year but I can see on the live site it's still there. I refreshed the page and cleared the cache however it is still showing on the live site. ...
0
votes
3answers
1k views

How to add separator between default and custom panels in WordPress customizer?

I have implemented theme options using WordPress customizer with a mix of native WordPress customizer fields and Kirki framework. This works great. Now, I wonder if it is possible to add a separator ...
0
votes
0answers
13 views

How can i add to a existing wp query

Basically what I would like to achieve is I am building a property site and would like to build a custom search form that will search for tags and show products relating to the tags selected do I have ...
0
votes
1answer
8 views

Get the URL of the page from which an ajax request has been launched within ajax callback

I'm calling a server-side function written in PHP via wp-ajax. The server-side function eventually redirects to another page for an authentication step, and then redirects back to the initially shown ...
0
votes
1answer
1k views

Form direction to .php on localhost

I need to make a form submission. At the moment I have created a post with has the URL... http://localhost:8888/japan/quiz/ ... and includes a form with the following html: <form id="quiz" ...
0
votes
1answer
8 views

Making a child theme for "Airi"

I had chosen the Airi theme for my WordPress website. I planned to make some customizations and decided to use a child theme. I had studied the WordPress documentation page https://developer.wordpress....
1
vote
1answer
1k views

Adding user data to an existing user_id

I'm using phpMyAdmin to add some new user records to the existing users within a WordPress database. The database is for a WordPress Multisite network. I had to migrate my old WP site to the new site,...
0
votes
2answers
2k views

Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test

I've been trying to grasp AJAX for the past 12 hours and i'm slowly losing it. How can I simply pass two basic input dates via form or any other means, not refresh the page, and have it execute the ...
1
vote
3answers
4k views

How to disable automatic excerpt generation *in admin*?

I'm adding a custom column named Excerpt with Codepress Admin Columns, and would like to know specifically when the Excerpt has not been filled out. Instead WordPress shows post content automatically, ...
0
votes
2answers
66 views
+50

Conditional sorting with variable using WP Query

I have for example this posts in WP: Name ID Date JohnA 6 01012020 JohnB 7 01022020 KateA 7 05052021 SamA 4 01022020 SamA 4 01022022 How I can order by date, but also put posts with ...
0
votes
1answer
711 views

Modify Database in Multi-Site wp_usermeta table

My name is Antonio and i'm from Ecuador, my english is not good but here we go. I already have my Multi-site installation working, but the "wp_2_" site have some error in the functionality, because i ...
0
votes
1answer
90 views

Restricting page templates by blog_id in multisite network

TL:DR; Is it possible to restrict page templates to a certain site within a multisite network? (Using something like get_current_blog_id for e.g) More details I’m building out several websites that ...
0
votes
1answer
3k views

Can't access Dashboard of a Multisite Wordpress. Chrome results in "ERR_TOO_MANY_REDIRECTS"

I'm suffering with this problem for two days. Here is my envroiment: I"m using Amazon EC2 with Ubuntu 16.04, I've installed LAMP, phpmyadmin, vsftpd and that's all. Then I've configured one clean ...
1
vote
2answers
1k views

Making an ajax request from a different domain

I'm making an ajax request from my primary domain to a subdomain. I've solved my cross origin issues so I'm not getting an error. The call is returning data:0. I've checked my response config and the ...
35
votes
3answers
117k views

How to get a taxonomy term name by the slug?

If I know a taxonomy term slug, how can I get that term's name?
0
votes
1answer
620 views

How to auto update post title and slug with category name when post status is updated

I need to auto update post title and slug with category name every time when post status is updated. Some function like this but with the correct code.... add_filter('wp_insert_post_data','...
0
votes
0answers
7 views

Browser Error Message: Firefox Has Blocked Parts Of This Page That Are Not Secure

Every now and again I keep getting this error message from firefox and other browsers like chrome and edge saying that parts of my page that are not secure are blocked and when I check to see what the ...
0
votes
2answers
1k views

Newly uploaded images are not updating in featured image

Using the google page speed test i saw that some images were too large and needed to be resized. I used the ftp to download the necessary images, resized them locally, and then used the media upload ...
0
votes
1answer
928 views

Custom Registration Fields woocommerce

Hi I am trying to make a custom Registration page for woocommerce, till validation it works fine but when i am trying to insert the data in database nothing happens. this is the sample code i am using ...
0
votes
1answer
12 views

Plugin to design E-Mail Templates which then can be used in own PHP code

After about two days trying to use Mailpoets E-Mail-Templates to send notifications from my own code (own plugin) I'm getting a little desperate... What I want is the possibility for a user to edit ...
0
votes
1answer
12 views

How to hide a woocommerce setting tab from admin & shop manager?

I want to hide specific tabs in woocommerce setting. I read this article: https://stackoverflow.com/questions/36779307/hide-a-woocommerce-setting-tab It worked for shop manager only. I want to hide ...
0
votes
1answer
15 views

Unable to return values from function

The function below is intended to return a list of the WordPress submenu pages. function get_admin_menus() { global $submenu, $menu, $pagenow; if ( current_user_can('manage_options') ) { ...
0
votes
1answer
1k views

Rewrite Page Parameters

i have a page call "city" http://localhost/wordpress/city/ and it get details from mysql by url id like http://localhost/wordpress/city/?id=paris and i want to change it like http://localhost/...
1
vote
2answers
1k views

Problem with Author page redirect

When trying to access the author's page (i.e. example.com/author/john) I am redirected to Woocommerce's shop page, however, if john is an admin, then I am redirected to author.php page correctly... ...
0
votes
0answers
8 views

Gutenberg Blocks and get_option() for styling

I'm creating a Gutenberg block and I'm trying to customize a button's style (background color, text color, etc.) and it's inner text with hexcode set in an options menu. What's the best way to access ...
0
votes
1answer
6k views

How to add widget in main menu

I want to display widgets in main menu. There are few plugins to do this and i already used in my previous projects. But now i want do without any plugin. I can create a custom sidebar and call this ...
0
votes
1answer
1k views

How to get tags and categories?

I used the following code to get tags from the post and then simply echo them: $posttags = get_the_tags($post->ID); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ', ';} ...
1
vote
1answer
664 views

Change the file path on get_template_part via plugin

I'm trying to make a plugin that will change the behavior of a theme. In the theme file I have a get_template_part('libs/templates/user_menu');. I want to make my plugin "force" the ...
2
votes
2answers
3k views

Where to put my global functions?

I currently have a global function in my functions.php file ein_error_log($message) { //push out $message to file... } But I want to start using it in my MU-Plugin directory and it doesn't ...
2
votes
1answer
780 views

Hide some items from Screen options in dashboard for products

I am trying to unset/hide some options in dashboard. I am trying it for products screen. Here is the screenshot Here is the code i tried to hide SKU /** Hide Dashboard widget by default via Screen ...
0
votes
1answer
1k views

Gutenberg Edit Block Inspector Controls and save

I am looking to edit an existing block to add inspector controls that save as meta data. I have been beating my head trying to find how to save the data. The following code adds a text field to the ...
0
votes
1answer
721 views

How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?

My website is a daily deals and offers site. I promote many online stores with affiliate links. I have created a php script to detect any merchant's link (ex- Amazon) and convert it to my affiliate ...

15 30 50 per page
1
2 3 4 5
2212