0
votes
1answer
125 views
+50

using update_user_meta to rank users

I'm using a plugin that allows users to vote on posts, I'd like to add each vote that's cast to the authors user_meta so I can rank users the same way I rank posts. There's a couple of different ...
0
votes
0answers
22 views

Individual page data in one page template

So I am trying to create a one page template but still allow the user to add separate pages in the admin panel. What I did to output all the pages in one template file is as followed: <?php ...
0
votes
1answer
33 views

How to create content automatically when a post is published?

Goal: Ability to automatically create content in WordPress posts/pages. Goal Details: When a post is created/published, it will automatically create or configure content based on the base data inputs ...
0
votes
2answers
153 views

Create Array from custom post type to display a slider

I have created a custom post type in my wordpress theme dedicated to creating slides for a slider displayed on the homepage, It has a title, slide text and slide url and also featured image. I'm now ...
0
votes
1answer
15 views

value of metadata is null wrong use of if statement

I'm using the WP-Ratings plugin which uses the Wordpress built in custom fields to save values of ratings. The name of the custom field is ratings_score. I want to ask if each post has a specific ...
0
votes
0answers
57 views

New WP_Query loop in admin causes problems

I am working on a project where I have a custom post type 'companies' and on this edit page in the Wordpress admin I have some custom made meta boxes, for saving company information, opening hours, ...
0
votes
0answers
25 views

Link to post meta page (like WordPress does for categories)

I've got a few different categories, and each has it's own page. And obviously WordPress automatically links to the category template page: category.php. However, is it possible to do this with ...
0
votes
1answer
48 views

Remember the meta value with radio buttons

I've created a simple meta box consisting of two radio buttons: yes or no. When they click on the appropriate box, it saves the meta value to the database. However, the post page does not remember it ...
0
votes
1answer
69 views

The loop starting at a certain ID

Is it possible to start the loop from a certain post ID? I would like to get all the post starting at a certain ID, decendingly. To explain, I have to make sum assumptions first. Assume that my ...
0
votes
0answers
45 views

Use and get custom user metadata

I wanted to check if a post custom field matches the logged user's custom metadata. If it does then list only posts that match. I think that's possible.
0
votes
3answers
103 views

Order by a meta fiel in query loop

I would like to sort my article from a category by a number added in a meta field. Here is the first step, I get the articles to display on the page. <?php $cat = get_post_meta( get_the_ID(), ...
0
votes
1answer
97 views

How to retrive Custom Post Type Meta Fields in Custom WP_Query

Can some one let me know How I can render the Custom Post Type Meta Fields (Meta-boxes). I have a Custom Post Type Called "News" and I successfully added a Metabox to my Custom Post Type called "News ...
0
votes
1answer
72 views

Get post category as a separate string and url

I need to figure out how to get post category as a string and link, both separate from each other. So the return would be something like: Uncategorized http://link-to-the-category.com however both ...
1
vote
1answer
66 views

How to add “time” data this?

I am using this simple snippets to get post view count for a long time I was wondering if we can add a "time" data ? Because I would like to show the view of yesterday/ 2 days ago / 2 days ago etc... ...
1
vote
2answers
908 views

get_template_part() - post-meta not working?

Maybe I simply do not understand what get_template_part() is doing … I have a file called event-list.php that should work as template for other pages and files so all my events (a custom post type) ...
1
vote
1answer
37 views

replacing the_autor or make callback

I'm looking a way tho change the the_author(); function in the loop, I have post meta data with the name of the user who posted. I need to do this: If the user is registered, show the_author();, ...
1
vote
3answers
555 views

Why am I getting an infinite loop with have_posts?

I have the following code, which causes an infinite loop for some reason. Can anybody explain what's going on please? Thanks! <?php $flagged_stores = new WP_Query( array ( 'post_type' => ...
0
votes
1answer
298 views

Can I access a post meta field before the loop?

If I call the following function (on a page template, e.g. page-home.php) before the loop, nothing is returned. If I call it during or after the loop, the expected values are returned. Is there a way ...
0
votes
1answer
612 views

How can I sort my loop based on meta data, using a form?

I've created a custom post type called 'properties' with custom meta boxes of 'price' and 'rooms'. I have a custom loop-property-archive.php to display the properties. What I would love to have is a ...
0
votes
1answer
1k views

Metadata in loops

I have a standard Wordpress loop displaying items: $loop = new WP_Query( array( 'post_type' => 'images', 'orderby' => 'menu_order', ) ); while ...
1
vote
3answers
307 views

Grossly inefficient wordpress loops!

I'm working on a site at the moment for an orchestra. The various members need to be listed, according to their instrument. The members have a custom post type of biography and I'm capturing the ...
0
votes
1answer
802 views

get_post_meta printing empty fields, but it shouldn't be

I'm trying to call some hidden custom fields into a meta box. The custom fields are the same - a maximum of five named _link and five named _url, with sequential numbers following (eg _link3). ...
1
vote
2answers
4k views

Strategy to get post meta for use outside the loop

I need to know solutions for the question above. There are cases, when we need post meta information outside the loop. Let's say, I'm developing theme that will display ads from certain vendor on that ...