Tag Info

New answers tagged

0

Use get_userdata() to retrieve all user data. The function accepts user ID. So the following code will give you the user url. <?php php $user_info = get_userdata(1); /* replace 1 with dynamic user id variable in your context*/ echo 'User url: ' . $user_info->user_url . "\n"; echo 'Users name: ' . $user_info->first_name . "\n"; ?>


1

@Amirreza Nasiri - Yes that is possible. I have used following plugin to import large size files into WordPress Media library. Please take a look at this: https://wordpress.org/plugins/add-from-server/ I have no affiliation with plugin. I had used it for one of my client project and just found it as suitable suggestion for this question :)


0

I'm not sure whether its possible to download an external file directly to WordPress. But you can simply embed the video in your WordPress page without downloading it from the source. For that just click on 'Add media' button, then choose 'Insert from URL' and paste your video URL in the text box and finally click 'Insert into post'. This will embed the ...


0

It seems you have no menu selected. In the Manage location screen select an existing menu and Save changes. If there is none, click on "Use new menu". Then you should be able to edit it in the Edit Menus screen. See the Codex article on Menu Screens and the one on wp_nav_menu


1

Data in the WP database is serialized. If you just do a search and replace you'll break your site. You need to reserialize your data as you change it. There are scripts and services that allow you to do a proper Search and Replace. My tool of choice is this one, and it works perfectly. There are also a couple plugins that work (like velvet blues), and I ...


0

You can use a plugin called Velvet Blues Update URLs. I use it all the time. https://wordpress.org/plugins/velvet-blues-update-urls/


0

Hi i am not sure on what method you followed to rename domain name but the standard method what i followed is 1.Download the Sql file from old database 2.renamed the domain name from old to new in your case ExplainingProgress.com to OurWorldInData.org use an code editor for simple find and replace 3.uploaded the new sql file to the server 4. Dont ...


0

You can use mysql command as: UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com'); and UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com'); Please try on a test site before!!!


0

The problem turned out to be that my hosting company had copied domain.co.za to domain.com rather than pointing both domains to the same installation. I was able to update the site URL of domain.co.za to domain.com so all of its links went to domain.com, but I couldn't log in to domain.com so all of its links pointed to domain.co.za, causing the flip ...


0

Try to install plugin duplicator and create a snapshot than with the install.php and related zipped file you need to copy in a subdir or in the root (copy all site an db in local for secure restoring) the two file and launch install.php, in a wizard there is a step in wich you can ridefine the path of your doman so you can recreate all your wordpress site on ...


0

Doing a search via PHPMyAdmin did not show up any instances of the wrong URL. However, when I searched and replaced using this plugin https://wordpress.org/plugins/search-and-replace/ I found certain URLs were incorrect. Some changes could not be made with the plugin as they were serialized.


1

If you want to display a single custom field (post meta) then you can use: get_post_meta(); It has three arguments. The ID of the post The name of the post meta field (country_flag) Whether or not the value returned is a single string (in your case it will be); So the usage might be something like this: $country_flag = get_post_meta( $post->ID, ...



Top 50 recent answers are included