Elegant way to signify inheritance and relationship between posts

Using the Posts 2 Posts Module which is still being developed just no support is being offered except through the git fork. How to use it. function my_connection_types() { p2p_register_connection_type( array( ‘name’ => ‘posts_to_pages’, ‘from’ => ‘post_type_1’, ‘to’ => ‘post_type_2’, ‘cardinality’ => ‘one-to-many’ ) ); } add_action( ‘p2p_init’, ‘my_connection_types’ ); The above example will create … Read more

Post Type Upload Directory – {post_type}_upload_dir filter

‘apply_filters’ runs the value through all of the other hooks / functions attached to it. Try an experiment: print_r( $type ); print_r( apply_filters(“{$type}_upload_directory”, $type) ); While you might, in your case, get the same thing – the apply_filters makes sure that any other plugins that try to influence this upload directory will still work.

How to get the correct URL on my wordpress site?

A combination of answers for you. To remove the “wordpress” from your URL path, I would recommend the following step-by-step on “Using a pre-existing subdirectory”. http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install The end result will be your WordPress content pages at “mydomain.no” instead of “mydomain.no/wordpress”. The second part of the problem will involve writing 301 redirects for the URLs that … Read more

How would I get this to work – send to post from thick box

The correct way to do this is to: $(‘#upload-background-image-one’).click(function() { formfield = $(‘#background-size-one’).attr(‘name’); tb_show(”, ‘media-upload.php?type=image&TB_iframe=true’); // Take the selected image and insert only the src path into the text field. window.send_to_editor = function(html) { img_url = $(‘img’, html).attr(‘src’); $(‘#background-size-one’).val(img_url); tb_remove(); } return false; }); because when you click on a button you instantiate a call … Read more