meta field for numerous links

I an not entirely sure that I understood the question but I am guessing you need to publish an array of specific links on each post page. The best option will be to save the links in a meta field for that post. Note that you can store the links separated by a comma. Something … Read more

What image is this pulling?

$image = get_post_meta(get_the_ID(),’image’,true); This line is pulling the URL of the image from a custom field for that particular profile page. Do you see any custom fields in the admin there? Make sure you have the custom fields checkbox checked in the screen options tab (top right in the page admin).

foreach argument to get specific file types getting too many returns

You can add ‘post_mime_type’ => ‘…’ to your $args, as in: $mime_types = array (‘audio’, ‘application’) ; $args = array ( ‘post_type’ => ‘attachment’, ‘post_status’ => ‘inherit’, ‘post_mime_type’ => $mime_types, ) ; $query = new WP_Query ($args) ; See Mime-Type Parameters for more info. It’s not documented very well but the mime-types you set can … Read more

Changing WordPress author name in database

Take a back up before trying anything! 🙂 (I use the Duplicator plugin for that, if you don’t already have a solution. When you delete users in WordPress, it gives the option to attribute conent to another user. Would this suit your needs?

How to handle the structure of page/taxonomy/post without making wordpress get confused with the url

I found a workaround, i added to functions.php the below code : This code checks if current page is page or not. If it’s not page that means it is mysite.com/watches/term/ otherwise if it is page mysite.com/watches So problem solved. add_filter(‘template_include’, ‘template_include’); function template_include($template) { $post_type = get_post_type(); if(!is_page() && $post_type == null && !is_archive()) … Read more

get_post_thumbnail_id returns a negative number

Try this code: <?php $thumb_id = get_post_thumbnail_id(); $thumb_url = wp_get_attachment_image_src($thumb_id,’full’, true); if ( !empty($thumb_url[0])) { echo “There is a thumbnail and it’s id is: “.$thumb_id; } else { echo ‘There is no picture.’; } ?> For the second code, use: <?php $thumb_id = get_post_thumbnail_id(); $thumb_url = wp_get_attachment_image_src($thumb_id,’full’, true); if ( !empty($thumb_url[0]) ) : ?> <img … Read more

Multilanguage website on two different domains

Method 1. You can use .pot file to store translation and use wordpress default translator functions for all of your strings such as __e() Method 2: It is better to use any translator plugin since it will do all the necessory work for you. Few of them are here https://wpml.org/ https://wordpress.org/plugins/polylang/