Skip to main content

Unanswered Questions

4,334 questions with no upvoted or accepted answers
0 votes
0 answers
14 views

How can I make this shortcode multilanguage

I'm tryng to make my shortcode multilanguage but this code is not working: add_shortcode('periodo_affitti', 'translate_rent'); function translate_rent() { global $post; $lang = substr(...
0 votes
0 answers
32 views

PHP session sending header "Cache-Control: no-store, no-cache, must-revalidate". How to remove this?

PHP session sending header Cache-Control: no-store, no-cache, must-revalidate I want to completely remove Cache-Control in header
0 votes
0 answers
28 views

How to save Wordpress post and attachment images from front end using media library?

I'm developing a wordpress page to submit a post and its images attachment. I don't use input type="file" instead use jQuery wordpress media library. frame.on("select", function (...
0 votes
1 answer
59 views

How to display only the first 2 words of a post title

I am learning WP and want to display only the first two words of a post title to the user. For the end user only the first two words of the Post title (H1 class) should be shown but source should have ...
0 votes
0 answers
38 views

taxonomy pages returning “NULL” when running default WordPress function 'get_queried_object()'

i keep seeing the following in the php error log, repeating: [05-Aug-2024 02:34:41 UTC] PHP Warning: Attempt to read property "post_content" on null in /home/euognau/public_html/wp-content/...
0 votes
0 answers
26 views

Wordpress search every time shows no search found even data exists

I am using wordpress. What I am doing is, that when the user enters anything then it will search from the post and will show the result. I have added static content $_REQUEST['keyword']="team&...
1 vote
1 answer
31 views

Object name undefined using localize script

Iam having problems enqueueing a script with wp_localize_script. I have done this several times before and I cannot see what Iam doing wrong here. I have changed the handle of the script several times ...
0 votes
0 answers
13 views

require used as a function to load theme dependencies?

I've inherited a site from another company recently and found this in their functions.php file: function themeLoader() { locate_template(include('inc/wp_reset.php'), true, true); locate_template(...
0 votes
0 answers
22 views

Can't set a cookie from php

I am trying to add a cookie in my add_cookie.php file like so: <?php setcookie("TestCookie", 'epic_test', time()+3600); exit('cookie set'); But when accessing https://my-site.com/...
0 votes
1 answer
25 views

Adding code before any page loads

I would like to make a call to the external API before the page is loaded on my WordPress website. It looks somewhat like this: $si = session_id(); $res = @file_get_contents("https://my-api.com/...
0 votes
0 answers
34 views

How to get ACF field to show up on all posts on front end?

I have thousands of posts with attached files. These attached files are part of Advanced Custom Fields Pro. However, they are not showing on the front end for the posts. These files are utilizing the ...
0 votes
0 answers
44 views

Uncaught ReferenceError: custom_ajax is not defined

I am trying to create an application that will add products to a cart using PHP and JavaScript + Ajax. In order to do so, I have written this script in functions.php: // Enqueue Fetch API script ...
0 votes
0 answers
11 views

how to append ACF field data using one of the following filter/ hooks

using a plugin which lists the following as filters/hooks to append data: // Data Filters apply_filters('woocommerce_print_products_title', $this->post->post_title); apply_filters('...
0 votes
0 answers
29 views

Assembly Options at checkout

I want to add Assembly options at the checkout page like this https://imgur.com/a/WrzWCiO Anyone knows how to do it without plugin? Thanks add_action('woocommerce_after_order_notes', '...
0 votes
0 answers
20 views

Global update of records after import WP All Import Pro

friends. I have encountered a problem updating records. I am importing vacancies into the WP Job Board Pro plugin via the WP All Import Pro plugin. When importing, I have a field in wp_postmeta ...

15 30 50 per page