All Questions

Filter by
Sorted by
Tagged with
1 vote
2 answers
1k views

Image upload and download from front-end

I'm making a web app using wordpress, the app will include this library that will do some steganography operations. I need some help to understand how to implement a front-end image upload for the ...
sialfa's user avatar
  • 319
1 vote
0 answers
489 views

Vue and wordpress.Bad Request ajax request

First off, I'm not using wp in REST API mode. I'm simply using vue for an UI I wrote for an custom admin page. I'm using a development server spun up from webpack, I enqueue the scripts as so: ...
Zambang's user avatar
  • 31
1 vote
1 answer
997 views

Dashboard menu missing

I've lost the wp_users and wp_usermeta tables in a wordpress installation. I've recreated them and insert a new admin user. In particular, in wpAA_users (I use the prefix wpAA_), I have now a user ...
Renzo's user avatar
  • 113
1 vote
1 answer
1k views

WP Query search for attachments and their exact title

Due to lack of reputation, I must now ask the question. I want to create a search for all images in the media libary. The search result should only appear if you search for the exact title of the ...
Tim's user avatar
  • 19
1 vote
2 answers
293 views

Custom Post Type Taxonomy not showing

I have a class for registering post types based on the Wordpress Plugin Boiler Plate, in the below can anyone tell me why the taxonomy isn't showing in the admin menus at all? /** * Register custom ...
Dan Sutherland's user avatar
1 vote
0 answers
40 views

page loading time of a cached page

I am trying to find page loading time of a page using following code function loading_time() { echo '<p>Page loading time:'.timer_stop(0, 3).' seconds</p>'; } add_action( 'shutdown',...
query's user avatar
  • 113
1 vote
1 answer
33 views

Cannot complete migration on LAMP

I have a WordPress site with LAMP. Since I moved to a new apartment the site does not display well anymore, and I cannot access its dashboard through http://my-wp-site.com/wp-admin. Note 1: I set up ...
Fede9390's user avatar
  • 121
1 vote
1 answer
1k views

Add "All Posts" button to custom post taxonomy filter with ajax in wordpress

Does somebody know how to add "All Posts" button to my custom post ("albums") with custom taxonomy ("album_category")? I can see my categories (Mixing, Mastering, Production) and when I click on them ...
Sara Teofilova's user avatar
1 vote
0 answers
145 views

Cannot access wp-admin/wp-login.php (Wordpress backend) anymore, what could be wrong?

The problem I cannot access my Wordpress backend anymore. I cannot do this by going to www.sitename.com/wp-admin and not by going to www.sitename.com/wp-login.php. When I go to /wp-admin, it seems ...
Bartg's user avatar
  • 11
1 vote
1 answer
20 views

How To Redirect /url.html to /url?

I want to rediret mysite.com/page-url.html/ to mysite.com/page-url/ How can i do that ? I tried to create page rule in cloudflare like this - mysite.com/*.html to mysite.com/* but it's not ...
RGM7's user avatar
  • 13
1 vote
0 answers
14 views

Restoring backup of wordpress website on LAMP

I have a WordPress site with LAMP. Since I moved to a new apartment the site does not display well anymore, and I cannot access its dashboard through http://websiteurl.com/wp-admin. Since I had ...
Fede9390's user avatar
  • 121
1 vote
0 answers
182 views

Retrieve images from parent site to child site using current shortcodes

I have a WordPress network setup, with a parent site and a few other child sites within it. I have a custom plugin that saves content (images & posts) to a list for each user on my parent site. I ...
haltek18's user avatar
-2 votes
1 answer
35 views

How do i save this python code to text file.? [closed]

# Dependencies import json import requests # Specify the URL url = "https://official-joke-api.appspot.com/jokes/programming/ten" # Make request and store response r = requests.get(url) print("...
Paa Amoako's user avatar
1 vote
0 answers
36 views

Regex with a possible hyphen

I am working on a site for cars. I wrote a regex which worked, up until the point where brands are separated by a hyphen. These are 2 examples I want to match: class-s/ford-shelby-gt350r class-s/...
Beee's user avatar
  • 563
1 vote
0 answers
666 views

create a 2 row menu in wordpress

I am trying to split my menu in 2 rows by css but it doesn't work. Can anyone help me? I need my menu to be like (http://4amedical.com/en/) website, but instead, my menu moves under the subheader ...
A.Ra's user avatar
  • 21
1 vote
1 answer
154 views

how to handle multiple ajax wordpress queries?

I am having a problem with two ajax action. I have a post grid it has a frontend sorting "ASC" and "DESC". So if I click on "DESC" it changes the WordPress query arg "order by" to "DESC". It works. ...
user avatar
1 vote
1 answer
6k views

How to filter posts by specific date and its tag

I want to show the post dates of posts which is greater than $postdate value. what is the wrong with the following code? Instead of filtering the data by dates, it shows all the dates. I do not know ...
Ashur's user avatar
  • 23
1 vote
1 answer
65 views

How to submit form in a PHP file in WordPress?

I have a simple form in my WordPress footer.php: <form class="form-inline" role="form" method="post" name="contact" action="sub.php"> <div class="form-group"> <label class="...
thirteen4054's user avatar
3 votes
2 answers
522 views

How to remove the embed_footer?

I'm trying to remove the entire embed_footer from WordPress embedded posts. By adding the following code in the functions.php, I was able to remove the site title and comments icon. But still, the ...
Libin's user avatar
  • 276
2 votes
0 answers
2k views

wp-admin Redirects to Docker Container Name

RESOLVED The fix was to add proxy_set_header Host $host; to my nginx file in the location block. ___________ When I try to reach /wp-admin I am redirected to the container's name instead of my site ...
ADeveloper's user avatar
1 vote
1 answer
395 views

Adding custom post types to archive

I am wanting to dispaly custom post types on my archive pages using code from here: https://wordpress.stackexchange.com/questions/179023/adding-custom-post-types-to-archive-php but this now gives WP ...
Timothy Burgin's user avatar
1 vote
0 answers
3k views

How to create a gallery custom field for WordPress post?

I would like to create a custom field for WP posts that behaves like a Gallery Block (I can upload or choose photos from Media Library, and save data to this field). So that, on the frontend (in the ...
An Tran T.'s user avatar
1 vote
1 answer
21 views

Search for categories

I would like to propose on my site a search engine allowing to find categories (with suggestions), and not posts or pages. I tried different plugins, including ajax search lite, but without success, ...
Hgfdsoiu's user avatar
  • 121
2 votes
2 answers
3k views

Displaying Logged-In User Name and avatar in Wordpress Menu

I want show the avatar user and username with this code. add_filter( 'wp_nav_menu_objects', 'my_dynamic_menu_items' ); function my_dynamic_menu_items( $menu_items ) { foreach ( $menu_items as $...
WartraxX's user avatar
1 vote
1 answer
3k views

Put CSS inside a PHP file and include it the right way

I want to put CSS inside a PHP file, because with that I can use 'conditional CSS', depending on the value of a customizer control. My idea is to create a new php file, somewhere in my theme ...
ralphjsmit's user avatar
1 vote
2 answers
849 views

Media library not working with wp_editor() on the front end

Very related: Add Media has stopped working in the front end since 4.5 update I want to run the wp_editor() function to load the classic WordPress editor on the Front-End. I need to do this out of ...
Álvaro Franz's user avatar
1 vote
1 answer
21 views

Missing tested up to on readme text validator

My theme has almost 9 problems which I have to fix. One is readme text where the reviewer says it has to fix like license. And he provided me the url to check validator. Here https://wordpress.org/...
webfuelcode's user avatar
1 vote
1 answer
2k views

Expose a custom field of a custom post type to the REST API

I added a custom field to posts and exposed it to the REST API, which works for standard posts and appears in the APIs response. But does not work for a custom post type (projects) which is basically ...
Carsten H's user avatar
  • 127
1 vote
0 answers
173 views

Where does the cookie mo_page_views_counter come from?

mo_page_views_counter: 3 mo_has_visited: true mo_is_new: true I have the following cookies set on my wordpress site... However I do not set these cookies and I have turned off all plugins that might ...
Jamie Hutber's user avatar
1 vote
0 answers
372 views

Create custom registration form for Wordpress Multisite

I have Multisite Wordpress website and i've seen the default the registration from but it did not meet all my requirements because i want to add more additional fields like Password field.
Ahmed Salah's user avatar
1 vote
1 answer
454 views

What is Stable Tag in WordPress plugin readme file

What is "stable tag" about and what should I put there...? Requires at least: 4.5 Tested up to: 5.3.2 Stable tag: 1.0.0 License: GNU General Public License v2 or later
webfuelcode's user avatar
2 votes
2 answers
988 views

Change dns-prefetch to preconnect with correct protocol

I have this function in my functions.php file: function dns_prefetch_to_preconnect( $urls, $relation_type ) { if ( 'dns-prefetch' === $relation_type ) { $urls = []; } if ( '...
GermanKiwi's user avatar
0 votes
1 answer
264 views

Custom post type rewrite slug translate?

I use 'rewrite' => array('slug' => 'uniquename') for custom post type, and I will have site in two languages. I tried to use if( is_main_site() ) { $slug = 'uniquename' } else { $slug = '...
Arttyor's user avatar
  • 41
2 votes
1 answer
3k views

Unable to programmatically remove product from WooCommerce cart

I'm using WooCommerce. For certain conditions, I'll want to remove a specific product from the cart. I feel like I'm using the correct method of doing this, but for some reason it's not working. Other ...
Will Ashworth's user avatar
0 votes
1 answer
110 views

class 'wphpc_PAnD' not found

PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, class wphpc_PAnD not found in /var/www/clients/client32/web3288/web/wp-includes/class-wp-hook.php on line 288 What can ...
Csaszi's user avatar
  • 3
0 votes
0 answers
49 views

Show featured image in all posts

I use the Uncode theme which allows me to place my featured image in the posts, however it only shows me those that have a large image (approximately over 1500 wide) and the small images do not show ...
Gerardo Rios's user avatar
-1 votes
1 answer
302 views

Static page with formatted post list

I'd be surprised if this doesn't get asked a lot, but I did a quick search and couldn't find an answer so... I have a couple of Wordpress sites and in both cases I really want to have pages comprised ...
Will Appleby's user avatar
0 votes
2 answers
219 views

How to call ACF field in functions?

I'm working on a website and am trying to fix how they set up their meta tags, but am having a bit of trouble. The current way its set up is that all pages have the og:image set to a logo. I want two ...
Anthony G's user avatar
0 votes
1 answer
106 views

Only one parent page showing

I'm working with the Incubator theme. I have created two other parent pages but they come up blank, with no content. The only way they show content is if I set them, one at a time, as the homepage in ...
MauF's user avatar
  • 211
0 votes
2 answers
827 views

Shortcode not being executed

I place the following code within the WP 'init' callback (or when plugins are loaded). add_shortcode('my_shortcode', function($atts, $content ='') { die(); } ); if (!...
Karl Bochert's user avatar
0 votes
1 answer
634 views

Programmatically Create Category and sub Category and sub sub Category

I want insert category like this: Category A sub-category 1 sub-sub-category 2 sub-sub-category 3 thanks this is my code $term = wp_insert_term( $row[...
Khairi Ksouri's user avatar
1 vote
0 answers
110 views

Yoast SEO plugin "could detect no serious SEO problems" on dashboard

In the Yoast SEO plugin dashboard (SEO -> General - Yoast SEO) of my wordpress blog, I see an orange check mark and the assuring text "Problems (0) Good job! We could detect no serious SEO problems" ...
Ingo Steinke's user avatar
0 votes
1 answer
448 views

How to add apply_filter for a class property in plugin

I am trying to add an apply_filters function to a property of a class so that the form fields could be added to from another plugin or functions.php but I just can't get the $filter_fields to set. Can ...
Dan Sutherland's user avatar
1 vote
1 answer
350 views

allow non logged in user to upload images in media library

I have a website where I have a page that is accessible from any non logged in user . Its a form where I need to upload image through the form but when I try this its showing an error. But When I ...
Amit's user avatar
  • 11
0 votes
1 answer
629 views

Do I need to escape get_theme_mod('url') / ('mail') with esc_url?

Question is in the title, thanks in advance (:
Arttyor's user avatar
  • 41
1 vote
1 answer
769 views

Gutenberg Custom Style problem with background image

When calls theme's style.css file with add_editor_style inside gutenberg, background images are not loading properly. Lets say: #intro { background: url(assets/main.png) ; } Its working ...
Ünsal Korkmaz's user avatar
1 vote
2 answers
1k views

How can I properly enqueue wp-hooks without issues?

I want to provide the package @wordpress/hooks which currently resides in the core at wp-includes/js/hooks.js but I'm having a hard time finding exactly how / where it is enqueued so that I can copy ...
Daniel M's user avatar
0 votes
1 answer
1k views

SIte logo is not displaying

Am trying to display site logo in my website, which i have uploaded under site-logo section comes under theme->customize->logo->publish I have added following code in functions.php for support ...
Xavier Issac's user avatar
0 votes
1 answer
30 views

Discount in the specific product title using keyword ( Woocoommerce )

is it possible to create a function that calculates the 10% discount by specifying that in the "Clothing" category all products that contain only the word "shirt" in the title? Or rather is possible ...
Davide Ladisa's user avatar
0 votes
1 answer
33 views

Custom Loop.php having a loop inside a loop

Need some guidance. I am creating a custom grid for a blog. So for example block 3 and 5 are bigger etc... But for this to happen after else: i need to have two blogs in that one area so will be two ...
James's user avatar
  • 3

15 30 50 per page
1
384 385
386
387 388
2316