Main string of code (that doesn’t work): <span class=”price-in-kune”><?php the_field(‘tariff_price_kn’) ?> kn</span> The ways i tried to solve this problem: put insted of the_field(‘tariff_price_kn’) – echo(‘hi’) – the code worked add $post_id -> the_field(‘tariff_price_kn’, $post_id) $currencyKune = get_field(‘tariff_price_kn’); And then echo $currencyKune P.S 3) i don’t know exactly where should i put $currencyKune = get_field(‘tariff_price_kn’), so i put it before
Tag: custom-post-type
How do you query a custom post type (CPT) via an ACF relationship field?
Overview I have two CTPs: Range: Which showcases 4 van types Wheels Which showcases all wheels a van can have. In the wheels post type, I have two ACF fields: Image: Which is of type image (an image of the wheel). The name of this field is image Available on: Which is a relationship field where we can select which
WordPress – Split custom posts into rows and columns
I have a layout where we want to place the custom posts types on alternating rows and 2 & 3 columns. so basically: Any suggestions? Answer This is the code you got your results and its continue as your requirements you can check the screenshot below.. If need any more help drop the comment or message will help..
WordPress two custom_post_type one taxonomy
I create two custom post_type. The name of the custom post is- 1. Brand 2. Ethical And I have created a taxonomy. The name of the taxonomy is – Pharma. The common taxonomy of the two custom posts is one (pharma). Now I want, on one page – 1. Just to display all the names of Pharma Taxonomy. 2. I
Is there any way or method to concatenate while loop inside the string of HTML?
Is there any way to concatenate while loop inside the string? Basically, I need a string of HTML and there is some Metadata I want to retrieve from custom post type and want to store that data into HTML. thanks in advance for your help. Answer If you need to return html code, we can form that code first, put
WordPress how to display all posts based on tags
I have 3 tags: Tag 1 Tag 2 Tag 3 I need to display all of the posts in my custom post type and specified term. They need to be sorted by tag and hiding the tags that are not being used like this: Tag 1 Post A Post C Tag 2 Post B But it’s displaying like this: Tag
Posts not ordering by post__in
I am trying to display 3 blog posts that have been selected by the user in the admin. The order should go gridItem1, gridItem2 then gridItem3. I have set out my query below but it shows the selected posts but in date order not in the order I have outlined. I have searched other posts and added in the ‘surpress_filters’
Custom Page Template Deleted after generating new custom post from Form
I have a custom post type and a custom page template with a form field. The user enters the data and custom metadata in the form field, submits it, a new custom post is generated with the values passed to it. It all works fine except for one thing. When you submit the data it deletes the custom page template.
Search filter to show results on search page for custom post type
I have a filter that has select options for Wheel base and price. Wheel base is a custom taxonomy assigned to the vehicles post type. This taxonomy has two options SWB and LWB. Here is the markup for my form: When the search button is clicked, I want to search the vehicles post type and display those vehicles that match
How To Make Pagination For Custom Post Type In WordPress?
PRECONDITION: I created post type ‘comparison’. I created archive page for ‘comparison’ post type only. TASK: I need to create pagination at archive page of ‘comparison’. PROBLEM: I tried to use <?php echo paginate_links(); ?> but it doesn’t work, pls help. Answer Try the following code