Trying to show the category of a post in the post display

Use the_category(); on your template. It also supports $separator parameter so you can use your desired separator. Example: <?php the_category( ‘, ‘ ); ?> will separte categories with commas. By the look of your theme folder structure, you should add <?php the_category( ‘, ‘ ); ?> on child-theme=>template-parts=>content-excerpt.php. Add it to line 22. If you … Read more

Converting Array to String Issue [closed]

The problem here is that implode will take an array of strings, and join them together using a glue parameter, such as commas. But by your own admission, $low_date is not an array of strings. It’s an array of objects! Objects are not strings. Here each row is an object, where you have only a … Read more

What is the correct way to search 3 custom fields only in WordPress?

Are you using Advanced Custom Fields?(ACF?). Relevanssi is a really good plugin which increases the scope of the core WordPress search. Here’s the link: https://wordpress.org/plugins/relevanssi/ It allows users to search for posts via ACF fields attached to them. Once you install the plugin, you can use the following code in your functions.php file to instruct … Read more

how to add custom select field to wordpress edit page

A legacy solution is to add_meta_box() and set its context as side. This makes the custom metabox visible in the block editor Document sidebar. The modern way is to add a custom panel with Block API. Or if you’ve registered a custom taxonomy with register_taxonomy(), then you need to have show_in_rest parameter set to true … Read more

How to show contact form popup in same page

if you are using Contact Form 7 which is usually one of the popular free plugins you can use shortcode to display forms on a normal page by copying this into the editor and editing the form ID and title as needed. [contact-form-7 id=”1234″ title=”Contact form 1″] EDIT: You can use simply jQuery to hide/show … Read more