How to use Link Manager
How to use Link Manager
How to use Link Manager
Use Page Links To plugin by Mark Jaquith. Edit top level page and in section Page Links To select An alternate URL and enter # as an URL.
Your code works to create links, and WordPress should make a valiant effort to find the correct post, but it doesn’t get complete permalinks. To do that you will need to query the database for the post and construct a permalink if one is found. function transform_pseudo_anchor_wpse_101201($match) { global $wpdb; if (isset($match[1])) { $name = … Read more
Modifying the permalink href for posts with jquery
I don’t think there is another way to do this than adding 301 redirects manually. You removed old posts and then changed URLs of new posts. So there is no way to tell what new post to show, when you enter old URL. You have to manually tell that post “hieverybody” is new version of … Read more
Get all attachments: $attachments = get_posts( array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ) ); Check attachment “parent” for each attachment. foreach($attachments as $attachment){ $parentID = $attachment->post_parent; $postID = $post->ID; if($parentID == $postID){ //your code here echo ‘This attachment belongs to the current post.’; } } But if you already have the attachment, all you … Read more
Look at the specified link within the featured-image in the last part of your snippet. You’ll have to update the_permalink() with your custom link, too: <div class=”featured-image”> <a href=”https://wordpress.stackexchange.com/questions/106791/<?php echo esc_url( $more_link ); ?>”><?php print_thumbnail( $thumb, $thumbnail[“use_timthumb”], $title, $width, $height, ” ); ?></a> </div> <!– .featured-image –>
It is hard to tell exactly what you’ve done, and it sounds a bit messy, but I think you’ve created “Pages” using the child templates as the “Template” under page attributes. That, or you are linking to them directly with wp-content/theme/themename/templatename.php. You never want to link directly like that, but if that were the case … Read more
1) Check out: http://codex.wordpress.org/Function_Reference/media_sideload_image 2) I found that WP function to be somewhat limited to I wrote my own wrapper class/method. If you want to do the same you’re going to need PHP’s copy() function http://us2.php.net/manual/en/function.copy.php as well as WP’s wp_insert_attachment() http://codex.wordpress.org/Function_Reference/wp_insert_attachment Unfortunately, I haven’t pushed my code to GitHub just yet, so for now … Read more
The plugin author has solved the issue. He says: I have encountered this bug before, but I just now realized what’s causing it: the ‘comment_text’ filter is not applied on the updated comment content. The make_clickable() function, which makes the links in the content clickable, is hooked to this ‘comment_text’ filter. Anyway, it’s fixed now: … Read more