Skip to main content

All Questions

Tagged with
0 votes
1 answer
27 views

Custom Field in Page Title

I need to show a custom Field in a title (CPT) I have this code function wpse_224340_document_title($title){ global $post; // make sure the post object is available to us if(is_singular('mec-...
Laurapnunez's user avatar
0 votes
1 answer
900 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
  • 131
0 votes
1 answer
51 views

How to execute a shortcode within a custom field?

I am using a plugin that generates a shortcode to display files from a Dropbox folder. I need to display the shortcode on a specific page, but it will be different for each user. Therefore I have ...
Ollie's user avatar
  • 1
0 votes
0 answers
390 views

Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)

I'm making a certificate that's supposed to autogenerate and involves the need for multiple dynamic fields. I have everything else finished but I have difficulty trying to create 3 dynamic fields. ...
ElectrocuteComputer's user avatar
0 votes
0 answers
34 views

Updating Metadata with Shortcode

I'm trying to create the below function to check a user's for the metadata field "order_review_cards", and swap the value for Yes-no or no-yes. Not sure why the code isn't working. I can do: ...
Mitch C's user avatar
0 votes
0 answers
208 views

Woocommerce Shortcode which displays a table with product data

I searched for the internet but didnt find anything which works to my use case. I want to have a shortcode which displays a table of products. In each row I want the product to have the following data:...
Marcel Dz's user avatar
  • 101
0 votes
0 answers
71 views

Alike Shortcode using in Custom Shortcode

I'm using Alike plugin to compare my custom post types, Alike provides shortcode [alike_link] to run the procedure and I have created a shortcode to display my custom post type. In this shortcode I ...
Suman Ahmed Developer's user avatar
1 vote
1 answer
245 views

Shortcode To Display Post Custom Field Value Inside Excerpt

I want to create a shortcode that pulls value from a custom field of a post and returns that value inside excerpt. I already have a function for the custom value: function geo_name_function( $atts ) { ...
Discover's user avatar
0 votes
2 answers
57 views

get_post_meta shortcode returns empty field

I'm trying to create a custom shortcode that will allow me to input custom order field data into an auto generated outbound email template via the Custom Order Status for WooCommerce plugin. My ...
rabiancone's user avatar
0 votes
1 answer
152 views

Block error message in foreach loop when looping through ACF field

I have 2 Custom Post Types (created with CPT UI and ACF) "Global" and "Personal". The idea is for the user to reference a "global" post by displaying the image (linked) ...
DCEXC's user avatar
  • 7
0 votes
2 answers
392 views

Shortcode To Display Post Custom Field Value in Post Title, Post Content

I want to create a shortcode that pulls value from a custom field of a post and parses that value on Post title, post content. So if the custom field value is Icecream for Post 1. On the admin side ...
Discover's user avatar
0 votes
1 answer
466 views

Shortcode for Custom Field of Media Attachment (to use with Featured Images)

I'm using ACF (Advance Custom Fields) for Media Uploads to store location information about photos. When I set a post Featured Image to a photo that has this extra field, I'd like to output the ...
Rob Jackson's user avatar
1 vote
1 answer
727 views

How to display Common posts from specific Tag & Category with Shortcode

How to display posts that are common in Category A and Tag A, and I want to display posts by shortcode so that the Shortcode can be used on multiple locations with different category Ids and Tags. I ...
Puneet's user avatar
  • 47
1 vote
0 answers
23 views

Orderby is working with one query but not with other

I'm using a shortcode to show some price boxes. I use a CPT with a custom field called 'posicion' which has a number that I use later to customize the loop. This is the code: <?php if ( ! defined( ...
Alex's user avatar
  • 11
0 votes
1 answer
606 views

How to pass multiple custom fields as shortcode's parameters

I'm learning how to pass parameters in shorcode, I know the basic step after read through WP Codex. But for now, I have plugin come with custom fields and as the title, I want to know how to do it. ...
Hung PD's user avatar
  • 297

15 30 50 per page
1
2 3 4 5 6