Articles of posts

Remove Content after <!–more-> tags

Here with the structure of content in text editor Content Before <!–more-> Content After I wanted to remove the “Content Before” in my single post so instead I have this Content Before Content After I will have the “Content After” on my single post only Content After How can I achieve this display?

How can I remove the first two words and shorten get_the_title()

Some of my posts‘ titles have leading words, followed by a colon. I am removing the leading words and the column of every post title in the loop with the following: <?php $title = get_the_title(); $title_array = explode(‘:’, $title); $first_word = $title_array[1]; echo $first_word; ?> How can I also limit the total length of the […]

Latest posts by category — how to exclude current post?

This is the code I use to display the 4 most recent posts under the category the current post belongs to (right below the current post): <?php if (is_single()) : ?> <?php $count = 0; $aahan_category = get_the_category(); $aahan_category = get_term_by( ‘name’, $aahan_category[0]->cat_name, ‘category’); $some_featured_posts = new WP_Query(array(‘category_name’ => $aahan_category->slug, ‘posts_per_page’ => 4)); while ($some_featured_posts->have_posts()): […]

Using setup_postdata() with multi-dimensional array

I feel like this is going to be one of those slap yourself on the head questions, but here it goes anyway: I have a multi-dimensional array of data: Array ( [0] => Array ( [id] => 1033 [zip] => 27604 [distance] => 0 ) [1] => Array ( [id] => 1024 [zip] => 27615 […]

How to only publish posts with image in it

I use a standard loop in my index.php and that shows all the posts beeing posted. What i’m looking for is a code that only shows the posts that have image(s) in it. With other words: i only want to show posts that have images in content in my loop.

Add Blog to WP homepage Manually

I’m using the »Free e-commerce Theme Balita«, as posted on Smashing Magazine. It’s great, but doesn’t have the standard WP blog with corresponding number of post per homepage as settings; as default Twenty Eleven. Q: How do I manually add the blog to appear at homepage?

Getting Duplicate Posts on Home Page with Widget Added Between Posts

I’m trying to add a widget area in between posts on the home page. I got them to show right where I want them, after the first post. The problem is that the first two posts are duplicated. The same post that shows above the new widget area is also shown after the widget area. […]

Fast publishing in wordpress

Wodpress editor is too slow. How to create other faster interface or how to fast publish posts. I just need fileds for author, category and subtitle. Is there any way instead of default wordpress editor ?

Is codex right on deleting post?

The codex has this to say on wp_delete_post. When the post and page goes, everything that is tied to it is deleted also. This includes comments, post meta fields, and terms associated with the post. Which kind of suggests that if a post that had the tags a,b,c attached to it gets deleted, then, all […]

How to create a second posts page which client can update

Bit of a wordpress novice and so just wanted to know the best way to do this. I am currently creating a wordpress site for a client. They have a Latest News section which is the primary ‘blog’/posts page. The sidebar also displays the latest blog post. Now what I would like to do is […]