Updated Wordpress site url but hyperlinks are still unchanged
I updated two site urls in the database. However, hyperlinks such as Top Menu are still redirecting to the old site. Any idea what it is? I'm new to WP. Thanks.
<a <?php if( $item->hasLinkClasses() ) : ?>class="<?php echo $item->getLinkClasses(); ?>"<?php endif;?> <?php if( $item->hasLink() ) : ?>href="<?php echo $item->getLink();?>"<?php endif;?> <?php if( $item->getTarget() ) : ?>target="<?php echo $item->getTarget();?>"<?php endif;?> <?php if( $item->hasLinkAttribs() ) : ?> <?php echo $item->getLinkAttribs(); ?><?php endif;?>>
<?php if ($item->getLevel() == 0) : ?>
search check your database for this url is changed or not.
static url will work same on server or localhost.
The best option is (I've used it several times) to use DATABASE SEARCH AND REPLACE SCRIPT IN PHP to update the urls in database because there are urls saved in database that needs to be changed. Download that script and follow the instruction on the site
INSTALLATION & USE about the usage.
You have to upload it to your root directory of
WordPress installation and run the script using something like
http://example.com/searchandreplace.php, you should rename it before you upload it to your server.
Important: Once you use it then must remove the script from your server.
csv comma seperated url conversion from plain urls to hyperlinks
i have a csv file full of plain image links eg : http://www.domain.com/galleries/big/gallery_69_1481.jpg, i have over a thousand of them to convert to a gallery images in wordpress's post content i thought notepad ++ would be the easiest using regex. i cannot find anything that would allow me to prepend and append text on either end of the url to m...
Updated Site URL but it is not reflecting the changes
I have my Wordpress installation located in "webroot/example.com/WP" folder. Currently, http://example.com shows a 404 page not found error. However, http://example.com/WP loads the Wordpress site. In the Settings->General area, I have both Wordpress URL and Site URL set to http://example.com/WP Now, I would like to change only the Site URL to http...
WP site URL changed to have HTTPS but still homepage does not redirect
I've changed the WP site URL to include https://www & it's been a while. Entire site is correctly reflecting it. But unless I add following in .htaccess, the home page does not redirect But, in case htaccess goes corrupt & gets regenerated, it skips this part. Then http://domain.com does not redirect to http://wwww.domain.com Even if that p...
Query last updated posts (posts updated in the last 24 hours)
I'm having some difficulty to find an example of how to create a loop with posts that had been updated in the last 24 hours. My idea is to have a page of posts or perhaps on the index.php a lists of posts that had been updated in the last day (24 hours from the time the query is done) Is this possible ? Is there any way to perform that query ? Than...
Compare custom taxonomies of updated post (or new post) [Updated with progress]
I am using the Transients API to cache category loops for a custom taxonomy. All works fine, but if I add a new post or update an existing one, I woud like to compare the taxonomy values and then clear the transients based on the difference in IDs and then clear the others. Transients have the following format, _transient_mouldings_cat_loop_141 whe...