Articles of posts

wp_update_post creating revisions instead of updating the post

I have been trying to update a post in the posts table but for some reason, it is creating a multiple number of revisions but not updating the main post. I have been trying hard for the last one day to figure this out but so far so luck with this. $post_meta_value = get_post_meta($unit_post_id, $post_meta_key.’_after_id’, […]

Get featured image on hover of post title

I need to get respective featured image on hovering of post title is there any plugin to achieve this I tried geting this by using Js and CSS but failed to achieve.Searched through Googe and WSE too but not successful. Thanks in advance

get_posts not pulling the correct number of posts

I am using the BracketPress plugin and trying to pull all of the posts of post_type brackets so I can send a newsletter blast to everyone with their current leaderboard position. However the get_posts that I am using seems to only pull half of the posts I should be pulling. Here’s the code I am […]

I don't want the complete article to show on homepage

When I post articles the complete article shows in the home page. I just want it to show Intro and then read more. I did not create the site myself and just taking on the role of admin of the page.

Show posts on front page only

I have a carousel that I want to be posted on the front page only but for some reason the code is not working. The conditional statement <?php if ( is_home() ) : ?> <div class=”hero”> <div class=”hero-carousel”> <?php $catquery = new WP_Query( ‘category_name=feature&cat=1&posts_per_page=5’ ); while($catquery->have_posts()) : $catquery->the_post(); ?> <article> <?php the_post_thumbnail(); ?> </article> <?php […]

Why aren't paragraphs breaking on this page?

This page is created using a recent posts shortcode included with my theme. It is not displaying paragraph breaks that I’ve added in the editor and I’d like it to. How can I get the shortcode to display the paragraph breaks? This is the code that compiles the list of recent posts: if (!function_exists(‘mo_get_thumbnail_post_list’)) { […]

Banner appearing on Pages but not Posts; call it conditional confusion

I have a banner image that appears on Pages that I want. However, I also have a Page designated as a Blog where it doesn’t appear. Is there any way to have this banner appear on a Page that is using a blog template? Tried messing around with adding is_home() or is_page( $id ) to […]

How do you get all the urls of images attached to a post?

I’ve searched high and low and can’t seem to get it. I’m trying to output an XML feed with all the images attached to a post from a custom post type: </BasicDetails> <Pictures> <Picture> <PictureUrl><?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID)); ?></PictureUrl> <Caption></Caption> </Picture><Picture> <PictureUrl></PictureUrl> <Caption></Caption> </Picture> </Pictures> I’m using wp_get_attachment_url but it’s only returning one image (There’s […]

Link to date_query results in WordPress

I have this line of code: $args = array( ‘date_query’ => array( array( ‘after’ => ‘January 1st, 2015’, ‘before’ => ‘February 15th, 2015’, ‘inclusive’ => true, ), ), ); $query = new WP_Query( $args ); This code will return all the post published between Jan 1st and Feb 15th. My question is can I somehow […]

Inserting an example of the last 3 post on to the homepage

Hi everyone I am new of here, and I was looking for this answer for a while, but I guess that I am not finding the right way to google the question. I do not know PHP, but I know quite well html and css, and I am personalising a wordpress to put on the […]