Get post / page ID from ACF Link field

The Page Link documentation actually shows how to retrieve the ID from a Page Link field. Just needed to do this myself and came across it. It worked well for me. <?php // vars $post_id = get_field(‘url’, false, false); // check if( $post_id ): ?> <a href=”https://wordpress.stackexchange.com/questions/304960/<?php echo get_the_permalink($post_id); ?>”><?php echo get_the_title($post_id); ?></a> <?php endif; … Read more

Convert link in WordPress 3.2.1

Go to Settings->Permalinks, select Custom Structure, and set the text box to just /%postname%/ You might consider the second bullet point in the docs recommending against this particular URL pattern, though. This was addressed in 3.3

Adding a text link under the post title in the lists of posts

You can enhance, change the strings to each post title in the table view of backend on post via hook: add_filter( ‘post_row_actions’, array( $this, ‘add_archive_link’ ), 10, 2 ); See the result in this screenshot: Below you find my method to add a link /** * Add link on archive * * @uses get_post_type_object, get_archive_post_link, … Read more

I copied my site to another site but all links point to old site

What web addresses are in your Dashboard > Settings > general? if it is the old site, try changing it, if changing is impossible, try putting the following code at the top op wp-config.php: define(‘WP_HOME’,’http://www.new_site.com’); define(‘WP_SITEURL’,’http://www.new_site.com’); Are the site urls correct? Try searching your page template and see if you have still some old links … Read more

Page-Linking Structure

As @Milo mentioned in his answer, you can’t and shouldn’t directly call a template file. It is a security risk, and you will no longer be able to access WordPress’s engine, so you can’t use functions such as the_permalink. To include a template part in your home.php or any where you wish, you can use … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)