The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
992 views

Elegant way to include only published posts with get_objects_in_term()?

The obvious way is to iterate through the resulting array of IDs, get_post for each and test against post_status == 'publish'. But I wonder whether this could cause memory issues since get_post will ...
1
vote
1answer
19 views

Obtain page data and use regular loop

Is there a way to obtain the data from a certain page outside the regular flow, more efficiently than via get_post($id)? I know that I can get for example the title with $post = get_post($id); $title ...
1
vote
0answers
28 views

Formatting get_post content doesn't allow JS content to function properly

I am currently pulling in the latest post on a category page based on which category you click on. When you click on the category "Code Examples" you see this: I am using the Crayon syntax ...
0
votes
1answer
227 views

using query_posts to pull posts out of a category in a while loop. Getting odd echo

I have a custom template file I've been workin on. I have this code performing a loop after it queries posts from a certain category. This works and I have each post configured with styled divs, but ...
0
votes
2answers
308 views

Get current post data into array?

I'm trying to achieve a similar effect to get_page($id), but with the current post acting as the argument for get_post(). Something like this pseudocode: get_post($this=>ID); . Seems simple, but I ...
0
votes
1answer
329 views

Retrieving custom field value with get_post?

There's no mention of custom fields values in Get_post's codex page. Is it impossible to use get_post to get a custom field value of some post, and if so, is it necessary to perform a whole loop just ...
0
votes
1answer
159 views

How to get post meta in functions?

I set an email button in functions php. The email is sent when clicking on a front-end update post button. The problem is: the email is sent but I can't get the post title to appear in the post. I ...
0
votes
2answers
382 views

Get post content intro text on category.php?

For some categories on my site there's introduction text that needs formatting (so using the category description isn't an option) and placing at the top of categories.php. I've added a post ID to ...
0
votes
0answers
7 views

Modifying Wordpress XML-RPC Built-Ins

In short, I want to be able to modify the wp.getPost response to also return additional data, like the permalink. I thought it would be as easy as just calling the same function the xml-rpc code ...
0
votes
0answers
85 views

Check if post title already exists

I'm using the plugin "User Submitted Posts" which allows my users to create posts frontend. So I basically have a frontend post form. I'm trying to find a way for my users to be informed if a post ...
0
votes
0answers
29 views

getpost content with all formatting for admin pages

All My post usually uses various plugin based data manipulations (Like visual layout, grouping, plugin css, etc) And now I want to render a post content in my admin page. On using following code: ...
0
votes
2answers
708 views

Get the excerpt by page ID from another blog in a wordpress multisite?

I am trying to get the first paragraph on a page where page ID=2 and blog ID=1. I want to display this paragraph on a page in blog id=2. I have added the following code to the template page. //gets ...
0
votes
1answer
49 views

Get post by Category in custom template

I want get all categor and after that i want get 5 post per category. but my code not work! http://pastebin.com/vxDSGGZk <?php $categories=get_categories(''); foreach($categories as ...
0
votes
3answers
500 views

How to limit the characters shown on the page - get_content

I've the below php to display the content of the post id#9 on my 'home page' of my site, so that whenever the client updates the page, it's reflected on the homepage as well - rather than having to ...