Hot answers tagged

3

Don't use home.php for static home page, use front-page.php or any other page template instead. Also see Codex page for Creating a Static Front Page


3

1) The GUID is exactly that -- a GUID. It's used to uniquely identify the post. If you need to link to a post, then use get_permalink( $post_ID ) ($post_ID is optional) (link: get_permalink). 2) Not without a plugin, no. There's talk of using an image shortcode for 3.1 though, or maybe 3.2. In the meantime, you can try using an alpha version of my ...


2

WordPress 3.1 Internal Linking feature was coded as a TinyMCE editor plugin so its not really a widget or a meta box but you can code your own meta box and reuse the functiona needed for that. The files you need to look at are /wp-includes/js/tinymce/wp-mce-link.php /wp-includes/js/tinymce/plugins/wplink/js/wplink.js and maybe a few more but these are ...


1

That's a good catch. Here's a possible work around. Create the future post placeholder and set the date ahead in the publish date picker. Then copy either the permalink or use a URL shortner plugin like le petit URL to generate a short URL. Copy/paste either URL into the internal linker. Screenshot: https://skitch.com/noelsaw/r1ni7/edit-post-wpverse-...


1

Taken literally your question is about post to post relationships. Bad news — WordPress core doesn't do post to post relationships. However there are some solutions ranging from frameworks like Posts 2 Posts to plugins like Post Connector. Stepping a bit back though, structure you are describing strongly implies grouping of posts. The mechanism for such in ...


1

This line is your problem: $new_site_name = $site_name . '<sup>echo '<img src="' . plugins_url( 'images/wordpress.png' ,"logo.jpg" ) . '" > '</sup>'; Here you've muddled up the quotes and put PHP code inside a string expecting it to still work. e.g. echo ' this is inside a quote:' inside a quote ' . '; It doesn't work because the ...


1

So this looks like you're using a JS package manager, possibly Dustin Diaz's ScriptJS? And I'm assuming you are storing all these files within your theme folder it would then be just a matter of linking to your script.min.js file via the wp_enqueue_script mechanism as follows: function wpse143251_enqueue_theme_scripts() { wp_enqueue_script( 'dustindiaz-...


1

This is very similar to this question. We have to hook into check_ajax_referer to address the internal linking feature only. Then we register an action for pre_get_posts to extend the search to drafts and pending posts. We will still get no pretty permalinks, because they are excluded in get_permalink. So we register a filter for that too and ask WordPress ...


1

See my answer on question 3097 for a possible solution.


1

1.) GUID's in WordPress primarily exist for RSS readers. They are supposed to be unique identifiers so RSS feeds don't republish the same content over and over again. They are not designed to be used within WordPress posts or pages. Even though they may look like permalinks, they aren't and should never be confused with them. For this reason, the URL part ...


1

Problem 1: Yes, you should not use the guid in the template code. See this recent thread from the wp-hackers mailing-list: http://lists.automattic.com/pipermail/wp-hackers/2010-September/034559.html Problem 2: This question is actually one of the most discussed. :) http://lists.automattic.com/pipermail/wp-hackers/2010-September/034652.html http://core....



Only top voted, non community-wiki answers of a minimum length are eligible