Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
2 votes
1 answer
511 views

Block Editor - Meta values not saved, meta changes to empty array on update

Issue TL;DR I have a block that updates meta values, but when I click 'update', the values are not saved for the post. Additionally, the meta values I get from useEntityProp load as an object with ...
Baerkins's user avatar
  • 163
0 votes
0 answers
478 views

warning: trying to access array offset on value of type bool ACF field image group

I have a problem with an acf function for displaying an image by array. I can get my image to work well when I upload it to the field associated with it. On the other hand, when I don't put an image, ...
user avatar
0 votes
2 answers
61 views

How to conditionally display an ACF custom textarea contents only to those users chosen from an ACF User field

How to conditionally display an ACF custom textarea contents only to those users chosen from an ACF User field. I have an ACF User field (allowed_users)that author's can multiple select when they ...
Pete's user avatar
  • 1,048
0 votes
1 answer
89 views

doesn't save custom meta box data wordpress

My WP doesn't save my meta box data. I see the metabox and the field, but the data doesn't saving. Somebody could help me? Thank you. This is the code: <?php // Function to add a metabox function ...
Tivan Cell's user avatar
-1 votes
1 answer
47 views

Custom rest fields not loaded in rest api cpt response

I have a custom endpoint that will be used from my vue app to load custom post type I've registered using a custom plugin. I need to add some custom fields to the response when the posts are loaded ...
OHICT's user avatar
  • 133
-1 votes
1 answer
625 views

No full page reload when navigating from page A to page B: is this possible with Wordpress?

Many websites nowadays don't reload a new page when navigating from one page to another. Instead, only the part of the page that has changed is updated (AJAX-style), but for example the menu, footer, ...
Basj's user avatar
  • 85
0 votes
1 answer
352 views

Display WooCommerce Order Custom Field In Template (HPOS)

Until now, I used this code to display a order custom field value inside a template: <?php echo esc_html( get_post_meta( $order->get_id(), 'my_custom_field', true ) ); ?> When enabling HPOS ...
Daniel's user avatar
  • 1
0 votes
0 answers
88 views

Use Custom Field to Display Post Loop

In my custom template I have created a menu which is a row of 10 horizontal tabs. Each tab shows a date which is defined using an ACF datepicker field in the post. I have also created a custom post ...
SavPhill's user avatar
  • 118
0 votes
0 answers
360 views

how to update page without reloading the page builder?

is there a plugin that will make it so when i click "update" on a page, it will do it via AJAX rather than reload every time? when using WPbakery, having to scroll back down and collapse/...
jdion84's user avatar
0 votes
1 answer
22 views

Query custom fields with three dates - start and end does not work

I have tried to make a reservation system for a book a table in restaurant. But, I have a problem when I try to see/ make new reservations in an specific day - in showing me which table are free at ...
Fujitsu09's user avatar
0 votes
1 answer
27 views

Best approach to create a customized page

I'm at the beginning of recreation of a WordPress website that: Has 15 informative pages (not posts) A dynamically updated examination index, that refreshes nightly via cron. Serves visitors in three ...
neoswf's user avatar
  • 125
0 votes
1 answer
44 views

Sort wp_query of two post types using meta datefield for one and date for the other - possible?

I have two queries that result in id-arrays that I merge into a common array which, in turn, has all the posts I need from the two post types (posts, events). However, in the sorted list I would like ...
yms's user avatar
  • 35
0 votes
1 answer
18 views

Why the value of the selector doesnt remain visible in the custom field after I edit the post?

I have a number custom field with a selector, I should select the number of bedrooms, when I edit the post the meta key value is saved correctly (I can see the number of bedrooms near the ...
Andrea Sacconi's user avatar
0 votes
2 answers
39 views

custom function works on page.php template but not in functions.php

I have a basic function attached to a button on the settings page of the dashboard add_action('admin_menu', 'add_streamline'); function add_streamline() { add_options_page('Streamline', '...
grzybowski1911's user avatar
0 votes
0 answers
144 views

How can I display a layout differently depending on whether the user is on Mobile or PC?

I am currently working on a website for which I have to display the different features of a product. When imagining the design, I had a very different layout for mobile and PC that would, in my ...
almecin's user avatar
0 votes
1 answer
198 views

hide "Open in New Tab" checkbox in link field

I added a custom field to a repeater with PHP: [ 'key' => 'field_sponsor_badge_url', 'name' => 'url', 'label' => 'URL', 'type' => '...
steve8094's user avatar
0 votes
1 answer
974 views

Custom fields in the billing address section woocommerce

I have added custom fields in the billing address in Woocommerce checkout page, this works fine. Now I would like to show these custom fields inside the "billing address" box in the email ...
LesCa's user avatar
  • 21
0 votes
1 answer
66 views

Change formatting of Date parameter on custom post type

So I have a custom post type called "wp_events", and I would like to update this portion: Where is says "Scheduled 2023/11/05 by default, I would like this format: Scheduled November ...
InvestedLabs's user avatar
0 votes
1 answer
1k views

get_the_ID() retrieves same ID on Gutenberg's Query Loop

I'm using Gutenberg editor and I want to add a shortcode (using XYZ PHP Code) that uses the post id to retrieve certain ACF value. I'm editing the home page where the last blog posts are shown, but I ...
Alvaro's user avatar
  • 141
0 votes
1 answer
22 views

Restrict page to members only does not work for page ID, slug or page title

I was wondering why (and how to) restricting pages by the following criteria does not work. I wanted to restrict the contact page due to spam. The code is being added and activated on front-end using ...
Johnny Bravo's user avatar
0 votes
0 answers
1k views

Custom jQuery code in Elementor page is not working on Mac os. On Windows browser work fine

Custom jQuery code in Elementor page is not working on Mac os. On Windows browser work fine. I make small jQuery script for tabs and put in Elementor page. On all Windows browsers is working fine, but ...
Pinky08's user avatar
0 votes
0 answers
24 views

It tells me that I exceeded the maximum number of executions when trying to publish content

I need the code to replace a post to be executed when publishing, it asks me for the ''updateSaved'' function. function actualizacionPost($condicion){ ...
Miguel Angel Salas8's user avatar
1 vote
1 answer
40 views

What is the best way to get a different post's custom field/postmeta with js?

In gutenberg I want to get a postmeta (it's a json string) that belongs to post #123. I want to check the editor's content against it. Let's say that postmeta's key is "blocks". So I made ...
user18102663's user avatar
0 votes
1 answer
801 views

How to automatically update ACF field value every year?

I'm using ACF in my custom post type and I have 2 numeric fields: one for Birth year and another for Age. I want to update the age field automatically based on the birth year field value. I found out ...
Adriana Leites's user avatar
1 vote
1 answer
60 views

The sidebar in wp-admin dashboard disappears when viewed on mobile screens in WordPress

I have created a user role called "Customers" through the "Ultimate Member" plugin which has access to only the "Pages", and "Profile" sections in the wp-admin ...
Programming Geek's user avatar
-1 votes
1 answer
98 views

Where can I find the missing page sections in wordpress?

This is not coding question. This question is related to Word Press I am new to Word Press. I am now trying to edit an old word press website from my company and i am struggling to find a solution ...
Khant Min Si Thu's user avatar
-1 votes
1 answer
440 views

Show only those pages that are created by the specific logged in user in WordPress

In WordPress, I created a new User role called "Customers" to only see the pages in the wp-admin Dashboard that only that role has created and not all the pages that are created by other ...
Programming Geek's user avatar
0 votes
1 answer
143 views

Replacing the deprecated function the_meta

the_meta is deprecated and it's told to replace it with get_post_meta. I'm using since long time this function for custom fields without styles: //the_meta function without styles: function mymeta() { ...
treibstoff's user avatar
0 votes
1 answer
76 views

Want to add custom post type for facebook feed

I have Facebook api for feeds. I want to add multiple user's Facebook feeds on their page. So, how can I add custom post type for Facebook feeds, which users can login to their account to get feeds ...
Devil mind's user avatar
0 votes
1 answer
39 views

Paginate_Links page 2 doesn't work

I have a custom query that can a list that can be up to around 20 items, so it needs pagination. It is displaying the correct amount of pages for how many items, but when clicking it it refreshes and ...
Erinn Szarek's user avatar
0 votes
1 answer
30 views

How to make a secondary Pages Screen

I want to make a custom Pages Screen in admin, leaving edit.php?post_type=page as it is. This screen will have different columns, different filters etc. I want the link for it to go under Pages and ...
pg.'s user avatar
  • 161
0 votes
1 answer
136 views

Why Does get_page_by_path Return The Sample Post?

I'm trying to check if a page exists, if it is published, and display a list item with the link to the page if it is. Here's my code: <?php $page = get_page_by_path('/privacy-policy/', OBJECT,...
Samuel Bacay's user avatar
0 votes
1 answer
50 views

Fields are not displayed on front end under custom php code in Advanced Custom Fields and Flexible Content field WordPress

I use Advanced Custom Fields WordPress plugin and the Flexible Content fields. So in one of the fields I need to include a php file, so I do it like this: <?php elseif( get_row_layout() == '...
Brgerg30879's user avatar
0 votes
1 answer
260 views

get Custom field label (select/dropdown) on front end

I have custom field added to product posts. This is dropdown field and displaying on front end it pulls the option value which is not display friendly, for example select option value is "...
Damir Gasparlin's user avatar
0 votes
1 answer
68 views

ACF number less than comparison not working

I have two ACF fields named as “price” and “reduced_price” now i have another field named as “price_filter” which should be filled with following conditions, If “price” is greater than “reduced_price”...
Shaharyar Afzal's user avatar
0 votes
1 answer
75 views

Edit Page button is gone

I am using Wordpress 6.2 and I have created a blog site. I cannot see the page where the blogs on this site are displayed under the "Pages" section, and the "Edit Page" button at ...
AliOsman's user avatar
0 votes
1 answer
114 views

Need pages with same names in multiple subdirectories

WordPress is installed in the domain's root. The site is built using custom page templates (not posts). I'm familiar with this SO question Move pages to subdirectory in Wordpress. I understand that I ...
Karl's user avatar
  • 103
0 votes
0 answers
223 views

How to consume external API from WordPress post editor and display the response data in the custom field?

I am developing a custom post type called "Team," where I will add some profiles of team members. I am using ACF for the custom field to add personal details of the members (I can also ...
Rousnay's user avatar
1 vote
1 answer
242 views

Add custom information in editor summary

I made a custom meta data to my posts by using register_meta( 'post', 'my-custom-field', [ 'object_subtype' => 'post', 'type' => 'string', 'single' => true, ]); That ...
Mehdi Zaidi's user avatar
0 votes
1 answer
32 views

Iterating over every multisite / theme and list the pages

is there a way to iterate over every multisite page and list their sub pages? In my case every multisite has it's own theme so iterating over every theme would be a possibility. My Code so far: $...
Sinco's user avatar
  • 1
1 vote
1 answer
104 views

Order custom post type by posts with most likes first

I am using the Like/Dislike plugin on a custom post type and am trying to order the display of posts by the most like count down to those that have no likes (and no set meta value in the posts meta ...
Mike Hermary's user avatar
0 votes
0 answers
18 views

"-2" Postfix added at the end of the permalink [duplicate]

I know -2 comes due to having duplicate names either in post/pages or media files. But I don't have any such duplicate name. In fact, I tried installing WordPress from scratch and tried to create a ...
Sarmad Nadeem's user avatar
0 votes
1 answer
452 views

Custom template is not showing up in templates dropdown list after re-naming it

I have a bunch of templates that I have in folders in my main folder. I know wanted to move all of these into a "templates" folder to make my code base more clean and easy to navigate. I ...
eligolf's user avatar
  • 123
1 vote
2 answers
63 views

How to display *block number* instead *date value* on Wordpress posts?

Ideally, the goal is to show the block number (ie: 782667) instead of the date value (ie: 26 March 2023 4:44PM CT) on all wordpress posts and pages that currently display it. There's maybe a script we ...
SuperAtic's user avatar
  • 149
3 votes
1 answer
251 views

How to add a custom field to the comments "Quick Edit" screen?

How do you add a custom field to the comments "Quick Edit" screen? The code below only shows on the posts quick edit screen: function tips_quick_edit_fields( $column, $post_type ) { ?> ...
Brian Smith's user avatar
0 votes
1 answer
352 views

WP_Query sort by ACF date field (newest first) with blank dates first

I have a custom date field that is optional. If a date is not provided, the item should be first in the items returned by WP_Query. Example: 1st: entry with no date 2nd: entry with date 1 March 2023 ...
Space's user avatar
  • 129
0 votes
0 answers
42 views

How to add page category slug to base url

I use register_taxonomy_for_object_type( 'category', 'page' ); to add a taxonomy to the Page, but the url doesn't show the page's category slug. So is there any way to display the slug of the current ...
pdutie94's user avatar
1 vote
2 answers
3k views

Can't create new pages in wordpress

I have ran a php code to remove some pages of the database, the code worked fine and i have left with the optmised pages i needed. However, now i can’t create new pages at all. This happened with 2 ...
shireef khatab's user avatar
0 votes
0 answers
280 views

Query order by a numeric ACF field

I created a query for the custom post type of "departments" the query gets me every department with ACF field "type_of_cetifecate" = "bach" and with a certain category id,...
endless842's user avatar
0 votes
0 answers
16 views

Why is a page shown with 'hidden' next to the name in the list of pages if the page is set to public?

Basically the question is in the title. I have a few pages where the pages are public and linked to from other pages but in the list of pages it shows hidden. But they are not in the list of hidden ...
MRawcliffe's user avatar