Tag Info

New answers tagged

0

Or, you can place this code in your active theme's functions.php: <?php // First, backup the default $postdata $backup = $post; // Now, override the default $tags = wp_get_post_tags($post->ID); // Now, open the if ( $tags ) statement if ($tags) { $tag_ids = array(); foreach($tags as $individual_tag) $tag_ids[] = ...


1

You should be using home_url() ( or something similar ) in your links for theme files when linking to pages. This will allow the domain to change and not affect your hardcoded links - assuming the ID's are the same of course. <a href="<?php echo home_url();?>/?page_id=634">Link</a> Good luck!


-2

Declare first page id $page_id = 634; , because you will need it to get page url by id. You can put it directly into the method, but its better to separate it, its more neat. Than you use ` inside of HTML href element to make a link to the page. You dont need to write absolute link, it is NOT recommended at all. When ever you can, try to avoid apsolute ...


1

For anyone who comes across this question. Related Posts for WordPress has the ability to automatically link posts and allows you to manually add, edit and remove the related posts. You can download it for free here: http://wordpress.org/plugins/related-posts-for-wp/


0

Maybe use the get_page_link() function: http://developer.wordpress.org/reference/functions/get_page_link/ I found it by searching for "get page link" here: http://developer.wordpress.org/reference/


0

/** * add nofollow to links */ function add_nofollow_content($content) { $content = preg_replace_callback( '/<a[^>]*href=["|\']([^"|\']*)["|\'][^>]*>([^<]*)<\/a>/i', function($m) { if (strpos($m[1], "YOUR_DOMAIN_HERE") === false) return '<a href="'.$m[1].'" rel="nofollow" ...


0

Did you actually create a specific menu and link it to one position you defined in functions.php? Once you do not link it to a position, WordPress grabs all pages and puts it in a menu. You should go like this: 1.) You put something this in the functions.php of your theme in order to register menues (if you only need one, leave out the line with the ...



Top 50 recent answers are included