Problem:
I am creating a custom template for a WordPress website and facing difficulties in making an image clickable with a URL from a custom field. The examples using shortcodes that I found are not working for me. I am trying to echo custom fields into an image that is clickable but have not succeeded.
Solution:
You can use the get_post_meta function to retrieve the custom field value and echo it inside the anchor tag's href attribute. Place the following code within The Loop in your template file:
[php]
';
} else {
// Optionally, display something else if the custom field is empty
echo 'No video link available.';
}
?>
[/php]
Note that with Toolset custom fields, you need to use the 'wpcf-' prefix before the field slug. It’s also good practice to use esc_url() to escape the URL for security purposes.
Problem:
I am trying to use a single taxonomy across multiple Custom Post Types (CPTs), but the URL structure doesn't work properly. Specifically, I need to filter by post type "transactions", but the URL is not reflecting the post type and WordPress doesn't seem to recognize it.
Solution:
Avoid using WordPress default taxonomy archive pages. Instead, create separate views for each custom post type regarding the taxonomy. In the view, create a custom search that filters the taxonomy for a specific custom post type, ensuring that only filtered terms within that custom post type are displayed. Note that you will need to create a separate view with search functionality for each custom post type.
Instead, I got: .../page/2/?wpv_post_search&wpv_view_count=5259, etc.
Solution:
I find a section about Browser History Management in the Toolset settings, in the Font-end Content section.
I disabled all inside, and it's works like a charm !