Removing the post format (type) slug

In your last code example, you’re returning a wrong type for the post_format_rewrite_base. It should be a string, not an array. However, your idea goes in the right direction. You have to take care about all the «routes» that are implied by the default rewrite rules, WordPress creates for post formats: type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ => index.php?post_format=$matches[1]&feed=$matches[2] type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ … Read more

Target all posts that are NOT aside or link post formats

Edited: Now that I understand your question, try this… Place this above your title to enable the post_class function. <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> Then add </div> below your title (or excerpt, or wherever you want this special styling to end). Now, a special class will be added in which you can use … Read more

How to get post attachments in gallery post format template

i had sort out this with function get_post_gallery find the answer if ( ! function_exists( ‘flexi_gallery_slideshow’ ) ) : /** * Display an optional post read more link * */ function flexi_gallery_slideshow( ) { echo ‘<ul class=”bxslider”>’; if ( get_post_gallery() ) : $gallery = get_post_gallery( get_the_ID(), false ); /* Loop through all the image and … Read more

Custom Post Formats

You can’t create custom post-formats. What you could either do is have a post category called portfolio and then use the body/post class specific to that to control the display on the front end, as this is what post-formats are designed for, or go for a custom post type. Personally I go by the idea … Read more

How to show only Standard Format post in my custom taxonomy page -wordpress 3.8.1

Looking at your comment, photos and videos aren’t custom post types but actually categories. I’m changing my answer to reflect your comment. You can use pre_get_posts to exclude specific categories in your loop. You can achieve that with $query->set( ‘cat=-1,-2,-3′ ); This will exclude categories with ID’s 1, 2 and 3, and will only show … Read more

Get image captions for images on gallery post format metabox

Get the attachment ID and convert to a post. From there the caption is stored on the post object. $thumb_img = get_post( get_post_thumbnail_id() ); // Get post by ID echo $thumb_img->post_excerpt; // Display Caption echo $thumb_img->post_content; // Display Description In your loop it would look like: <?php if($gallery) : ?> <?php foreach($gallery as $key => … Read more

How to show post format gallery metabox image caption in the post front end

You can add to figcaption on your front-end. <?php if ( !empty( $images ) ) { foreach ( $images as $image ) { $image_post = get_post($image); $caption = $image_post->post_excerpt; echo ‘<li class=”animated fadeIn”>’, ‘<figure>’, wp_get_attachment_image( $image, ‘post-full-width’ ), ‘<figcaption>’, $caption, ‘</figcaption>’, ‘</figure>’, ‘</li>’; } } ?>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)