markoburns
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: wrap text around custom fields arrayok, thanks.
Forum: Fixing WordPress
In reply to: attached images outside loop?hi – I’ve found this code that works, but how do I not show the images that appear in the post loop?
also if images are removed they still appear in the script, unless deleted from the media library – is there any way to fix this?<?php $args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_mime_type' => 'image' ,'post_status' => null, 'post_parent' => $post->ID ); $attachments = get_posts($args); if ($attachments) { foreach ( $attachments as $attachment ) { ?> <img src="<?php echo wp_get_attachment_url( $attachment->ID , false ); ?>" width="230" height="140" border="1" /></a> <?php } } ?>
Forum: Fixing WordPress
In reply to: custom post types with default categoriesThis seems to work for both archives and categories – is this the right way to do this? (It’s in functions.php)
function my_get_posts( $query ) { if ( is_home() || is_category() || is_archive() && false == $query->query_vars['suppress_filters'] ) $query->set( 'post_type', array( 'post', 'quotes' ) ); return $query; }
Forum: Fixing WordPress
In reply to: custom post types with default categoriesAny idea how I get the custom post types to appear in archives.php?
Forum: Fixing WordPress
In reply to: custom post types with default categoriesno , I need other custom types as well. Post formats is too limited.
I think i found it –
'taxonomies' => array('category')
added to register_post_type
Forum: Themes and Templates
In reply to: masonry with post formats or custom fieldsyes, I’m thinking that, thanks. Keep the custom post types for the formats and the custom fields for any refinements needed. Seems like wordpress has a good ways to go to simplifying this, although it’s nearly there just a little disconnected and messy.
Forum: Themes and Templates
In reply to: masonry with post formats or custom fieldsok – do you mean like mentioned here
https://mondaybynoon.com/2011/05/20/revisiting-custom-post-types-taxonomies-permalinks-slugs/and then to get them to appear
https://www.wprecipes.com/how-to-display-custom-post-types-on-your-wordpress-blog-homepage
But say I had an image post to go across 1 column and another image post to be 3 column.
Would it be possible to add a write panel to the image post custom post type that let me choose 1col or 2col and inserted code into the Div class based on that choice. Or would be be best to do that with a custom field inside the image custom post type.Thanks for the help BTW
Forum: Themes and Templates
In reply to: masonry with post formats or custom fieldsright -thought so. That’s a shame. Looks easier to use.
So if I have custom post types how do I configure the different write panels or way they are displayed – for example video having no title etc., do I need to create custom write panels and then assign them to the custom post types i.e. its pretty complicated!Forum: Themes and Templates
In reply to: masonry with post formats or custom fieldsIs it not possible to create your own post formats?
I tried to create one called 2col but it doesn’t show up on the side bar in create new post
add_theme_support( 'post-formats', array( 'aside', 'gallery' ,'2col') );
Forum: Fixing WordPress
In reply to: The uploaded file could not be moved -permissions error767 works – but is that secure ? – that lets the world execute and write etc.,
Forum: Fixing WordPress
In reply to: The uploaded file could not be moved -permissions errorRight- so should I go back to my ISP? What should I suggest to them to do?
Can you give me any more help or suggestions as to how to resolve this?forgot it should be website not website.tmpl
Forum: Fixing WordPress
In reply to: next page links on HP looping errorBrilliant thanks.
Forum: Fixing WordPress
In reply to: how to remove /#more for cleaner urlany idea if this doesn’t work in 3.0 as I just get errors when I put it in functions.php?
function remove_more_jump_link($link) { $offset = strpos($link, '#more-'); if ($offset) { $end = strpos($link, '"',$offset); } if ($end) { $link = substr_replace($link, '', $offset, $end-$offset); } return $link; } add_filter('the_content_more_link', 'remove_more_jump_link');
Forum: Fixing WordPress
In reply to: batch change image paths in posts ?thanks