Tagged Questions

Posts are the core of WordPress. They store content, are categorized, and are expansible with meta. Posts are grouped by post type, and within their post type by taxonomy (though a taxonomy can span more than one post type).

learn more… | top users | synonyms (2)

2
votes
1answer
3k views

Display post number not post ID number

I am wanting to display the number order of a post. I tried using<?php the_ID(); ?> but this just displays the post ID and doesn't seem to do go in sequential order due to post revisions and ...
0
votes
1answer
42 views

What do comments with […] mean?

I get a bunch of comments that simply repeat the title with '[...]'. ie: [...] Some cool post title [...] Is this spam or is wordpress doing something wrong? I have the akismet plugin enabled.
2
votes
2answers
866 views

Fastest way to loop through all posts?

I need to run a background process in a plugin that does some work on ALL the posts in a person's database once the plugin is installed. I'm very new at working with wordpress so my research has shown ...
1
vote
1answer
519 views

How to show last post of each website of a MU wordpress in HomePage

actually I'm running a wordpress MU website and each website has its own "life" but now I would like to show last X posts of each blog of my network on the homepage. I know how to do it using Feeds ...
1
vote
1answer
453 views

Multiple posts with fixed order position

I have a scenario where I need to account for promo posts/ads within a category. For example, say I have a category called "featured", when I click through to this category, posts #2, #6 and #8 will ...
1
vote
1answer
961 views

Get post ID outside of the loop

I am trying to accomplish something somewhat simple I think. I have a menu item at the top of my page that I want to link to the latest post in a certain category. I just need to get the post ID of ...
1
vote
2answers
125 views

can't use the page_test method to check pagination

I've tried to follow the example for Testing for paginated Pages but i don't know why it isn't working. i put it in the single.php file for post detection. i don't know why the page_test is broken. ...
4
votes
3answers
2k views

Moving Wordpress to new server: no posts found

I have a weird problem with moving a Wordpress installation to a new server (just the server changes, domain remains the same, I'm currently accessing the site on the new server via the same domain ...
2
votes
6answers
55k views

Facebook sharing link is not showing a thumbnail of the images within the post?

Usually facebook share gets an image from the site to post and shows it as thumbnails. If you press the share this on facebook link in my test page it doesn't. This is my test site: ...
2
votes
2answers
431 views

Is it possible to add a first and latest posts link?

I'm using the following code to show one post in a page (Blog pages show at most is set to 1 post): <?php /** * Template Name: Front Page * @package WordPress * @subpackage Prominent * @since ...
10
votes
7answers
32k views

GET the excerpt by ID

Why is it that one cannot get the excerpt by ID like with the title and most other elements. eg. get_the_excerpt(ID). I know how to use it with the $post->post_excerpt function but that does not ...
0
votes
1answer
640 views

How to automatically share posts on facebook?

Basically, I would like to know how to make a post appear on facebook (like when you press a facebook share button.) the right instant you click 'Publish'?
0
votes
1answer
508 views

Using wp_list_pages() after calling query_posts()

It's possible that I'm just doing this wrong, so feel free to let me know how you would solve this problem. I have a mostly page-based site, but there are a few "pages" where my content is coming ...
1
vote
1answer
405 views

Multi-site: removing /blog from posts

I'm deploying a multi-site network, using subfolders. I've found on the main site the permalinks for news posts can only be placed like so: /blog/%year%/%monthnum%/%postname%/ I understand that ...
2
votes
2answers
6k views

Get the Current Page Number

In a situation where one has 20 posts per page. I would like to get the current page number in order to make some nice page links at the bottom. How do you get the current page. I tried this ...
0
votes
1answer
462 views

How can I to add upload functionality outside of the admin area?

I am looking into updating this template (http://templatic.com/demos/answers/?ptype=ask-a-question) which allows logged in subscribers to post (questions). I would like to add an option to upload a ...
0
votes
2answers
1k views

MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?

EDIT: I want to update one field (post_content) within a known record (id of 4) of a known table (wp_posts) in a new database (new_db). The update has to come from one field (post_content) within a ...
1
vote
2answers
5k views

How to Customize number of blog posts on first page?

Under Reading Settings, I can specify how many blog posts to display on a page. However, I would like to customize this a bit. For example, I want to only display 2 posts on the "/" page, but 3 posts ...
0
votes
1answer
322 views

Query posts without a specific ID

How would we query posts as long as the post does not equal the ID 2047? Here is the current query. <?php $args1 = array( 'post_type' => 'options', 'tag_slug__and' => array( ...
2
votes
4answers
453 views

getting video dimensions

when attaching videos (eg. .flv) to a post - is it possible to query its dimensions? the problem is - i've got videos in 4:3 and 16:9 format and i need to get this information. any ideas? thanks
0
votes
2answers
605 views

displaying flv-video attachment in post

i've attached a local .flv video to my post (it was uploaded and is inside my mediapool). my question: how can i display it inside my post? (the video player) thanks
6
votes
3answers
2k views

How can I convert Posts into Custom type posts?

I have a Wordpress site that I just updated to 3.1. I want to make use of custom post types now, my question is how can I assign (transfer?) a post to a newly created custom post type ? For example, ...
0
votes
2answers
1k views

Stop wordpress from creating empty/null entries

Fiddling around with a custom post type which is quite heavy modified. Started doing some testing to see if I had broken some function, and realized that wordpress doesn't have a function that checks ...
2
votes
1answer
686 views

How to link up “read more” on excerpts hack from WP Recipies

I found the code on the WP Recipies page to force excerpts on the home page: function my_excerpts($content = false) { // If is the home page, an archive, or search results if(is_front_page() || ...
0
votes
1answer
1k views

Get_the_terms restrict output

I have a custom post type Holiday associated with a taxonomy Country. On my single-holiday.php, I use the taxonomy to display in the title. For example Holiday in Spain (Spain being the tax) Rarely, ...
6
votes
3answers
18k views

Submit post and upload image from front-end

I am trying to do something similar to the above question. I am trying to make users post and upload images from front-end. I have already done the post form and its working. I just followed and ...
5
votes
1answer
2k views

How Do I Use The Wordpress Plugin Posts 2 Posts by Scribu?

I have a Wordpress site that relies on relationships quite heavily. It's a record label website where artists can be related to tours, reviews, album releases and store items throughout the site. I ...
0
votes
1answer
39 views

On the post list, how do you show different text to the main content?

Not sure if the title makes sense sorry, but at the moment on my blog there is a long list of posts (with the thumbnail custom field) - the text next to the thumbnail is just the first characters from ...
0
votes
2answers
371 views

Stop Authors from submitting spam post

I am designing a frontend for users, where they can submit an article/post from. But i am worrying if someone puts javascipt code, or SQL injection, or other malicious code. Is there a plugin or some ...
0
votes
1answer
543 views

Exclude category from related post

I made a related post sidebar widget and im trying to exclude a category from it i tried 'exclude'=>7932 but that doesnt seem to work, is there another way to do this? <?php $category ...
0
votes
1answer
306 views

post-page: reference to parent page?

i'm having a problem with wordpress and the post-page: my web has several pages like: news, projects, links each page is displaying posts of the corresponding category. my question: when clicking on ...
0
votes
2answers
676 views

Is there any Wordpress alternative to Book module of Drupal?

Wordpress can be used as CMS. So, I think I can switch from Drupal to Wordpress. I'm looking for a book module alternative for creating structured document. If you don't know about Book module of ...
-1
votes
1answer
414 views

how to edit attachments?

when attaching eg. files to a post, how can i edit/delete them afterwards? couldn't find anything in the post editor. thanks
1
vote
2answers
315 views

How do I Show ALL posts for Catagories and Tags?

How can I get Wordpress to ignore "Blog pages show at most" when a user clicks on a "Catagory" or "Tag" link ? THANKS
0
votes
1answer
293 views

definining own teaser text for post

i'd like to have a small news box in my sidebar - so i need to display just a few lines of text, separated from the actual the_content() - how could i do that? it should be somekind of quicktag which ...
0
votes
3answers
2k views

Automatically added brs and paragraphs?

Here's my very simple shortcode: function box_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( 'width' => 'auto', 'height' => 'auto', ...
6
votes
2answers
647 views

Do we still need to include a “if (have_posts())” in templates?

I include this logic in my template all the time if (have_posts()): //show content else: //show content not found endif; But recently i began to doubt its necessarity, wordpress will turn to ...
3
votes
2answers
1k views

How to work with Syntax Highlighter Evolved?

I have installed Syntax Highlighter Evolved to simplify code snippets writting and highlighting. I know that it is quite popular and used by many bloggers so I must be doing something wrong because it ...
2
votes
1answer
2k views

Custom post type permalinks breaking due to 3.1 bug fix

So I just updated a site to 3.1 that uses several custom post types. When I had made the site I had not noticed at the time the $post_type parameter for register_post_type has to be in all lowercase ...
1
vote
2answers
2k views

$post>ID displays wrong post ID

I've asked a question about listing all sub-pages before: Listing all sub-pages? But all the questions were wrong. Anyways, I have now simpler question. global $post; echo $post>ID Works ...
0
votes
3answers
311 views

Get attachment if matches a variable

how do I match an image title from the media library to a variable then echo that image? this is my current code... <?php $args = array( 'post_type' => 'attachment', 'numberposts' ...
3
votes
2answers
109 views

How to automatically highlight syntax of code in a post?

I post my codes from different programing languages. Now, I want to highlight syntax of codes with different colors. But, doing it manually is time consuming. Is there any plugin or method which could ...
2
votes
2answers
697 views

Creating a Post form outside of the Admin

I am merging Wordpress into a existing system and require our users to be able to make posts to a multi-site WP install. I have a database table that will link our own member to specific blog IDs and ...
0
votes
2answers
707 views

Wordpress Theory Lesson - Image Columns within posts with alignment?

Trying to get my head round a request from a client, and thought I'd try to hivemind the solution a little bit. The client requires a two column post layout, with images down the right and text on ...
1
vote
2answers
10k views

how to display post content without post image?

i've implemented a jQuery gallery for displaying several images within a post. the problem is that the_content(); also displays the post image. any ideas how to filter it? thanks
0
votes
1answer
315 views

attach several images to post + gallery

i'm wondering if its possible to attach several images to a post then display those images in a thumbnail/fading gallery? By the way, the images should also be resized to a fixed size + thumbnail. ...
1
vote
1answer
604 views

Edit Post VS Custom Form

I have a blog which relies heavily on user generated content. I would like my users to be able to create posts, but the posts must only have specific fields: title content an attached image two ...
5
votes
2answers
3k views

Function to execute when a post is moved to trash .

Hi is there an action which can be performed while a post is moved to trash .... I tried delete_post and deleted_post. It works but twice for each action ( before and after the action as written in ...
1
vote
2answers
998 views

Is there a way to disable the sticky posts feature?

I want to turn this off as I have a custom ordering process using custom fields.
0
votes
2answers
298 views

Deleting post tags removes categories

I'm trying to remove old post tags from a few WP installs. In some instances, I have over 20k tags for a few thousand posts. I've tried the following code: delete t.*,tt.*,tr.* FROM wp_terms AS t ...