All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
0answers
37 views

get_post_metadata causing some meta data to fail

I'm using the following code to extend subscription trial lengths, which requires me to modify the metadata. the problem of, other metadata is also failing, such as custom attributes and variations. ...
0
votes
1answer
261 views

Why does get_post() not return anything?

Inside my functions.php I use get_post() or similar (such as get_the_title()) inside some of my functions. It does not return anything. Why? And how to fix that? P.S: And I can not really add ...
1
vote
2answers
95 views

Where to hook my plugin's action

I'm writing a plugin that every time you: publish a post edit an already published one delete a published post it makes several queries to the database, gets certain post data (title, excerpt, ...
0
votes
1answer
1k views

Add a custom class to the body tag using custom fields

There are certain posts where I want to manually append a custom body class using custom fields. How do I go about it appending the class to the body tag when a certain custom field is added to a ...
0
votes
1answer
509 views

Access post meta just after publishing

the following code is supposed to store post meta of the recently published post to the variable $temp. But it doesn't, $temp is always empty. This seems to happen because "transition_post_status" ...
0
votes
1answer
850 views

Hide H1 Title using the_title filter

I am trying to hide the pages H1 header IF a custom field specifies this. On a page back end I have added a custom field: Name = hide_title Value = true I then want to hide only the H1 using a ...
0
votes
1answer
1k views

Add custom fields after post/page title

I am using the Headway theme, and I need to add custom field code to page & posttitles. This is what I need to be able to do. example http://www.marbiedesign.nl/_img/customfield.jpg [edit:image ...
0
votes
1answer
674 views

Custom posts and get_post_meta in {$post_status}_{$post_type}

I am making a function to parse a .csv file uploaded in a custom field of a custom post. The name of the custom phone and the field's name is plan_information . The problem is when I var_dump(...