How can I create more “create attachment” custom field – any idea?
I’m not so sure I understand your question but if I were to guess, this might help: add_meta_box() Examples – WordPress Codex
I’m not so sure I understand your question but if I were to guess, this might help: add_meta_box() Examples – WordPress Codex
You can use the plugins Relevanssi or Search Everything and configure them to search custom fields.
It looks like this attribute is hardcoded into your body tag. You could adjust it with your own body_lang() function like this (untested) : <body <?php ( function_exists( ‘body_lang’ ) ) ? body_lang() : ” ;?> <?php body_class(); ?> > where you can define the following, in your functions.php file: /** * Display the language … Read more
var_dump your $args arguments: array(4) { [“cat”]=> string(7) “2,39,30” [“orderby”]=> string(14) “meta_value_num” [“order”]=> string(4) “DESC” [“meta_key”]=> string(12) “album_rating” } The second time you use a key, you overwrite the first time. You cannot build the array like that. The orderby parameter will take a space separated string, so this is closer: $args = array( ‘cat’ … Read more
You would probably make life much easier for yourself if you stored Post IDs as your custom meta value, rather than post URLs; that said, you can try back-tracing the Post ID using url_to_postid(), then get the post object from the ID, then get the post title: // Your original code here $custom_fields = get_post_custom($post_id); … Read more
Custom Field: Display only if a specific key is selected outside the loop
You can try to add this filter <?php /** * Plugin Name: Shortcodes support for the Custom Fields Widget plugin * */ add_filter( ‘custom_field_value’, ‘do_shortcode’ ); as a plugin. This should hopefully make your shortcodes work. Here you can read more about the WordPress function do_shortcode().
So here’s what I ended up doing: I hide the publish button, replace it with my own publish button (one that does not submit the form) and when you click that button the validation script is executed. When there are no errors, a click event is registered on the original publish button. That way, no … Read more
You can do it easily with jQuery by using .eq() to add a specific class to each i element. Example: Add a class to your i element from PHP. <?php wp_list_pages(‘link_before=<i class=”retina_icon”></i>&link_after=<br >’); ?> Then add another class to it with jQuery. jQuery(‘.retina-icon:eq(0)’).addClass(“retina-icon-1”); jQuery(‘retina-icon:eq(1)’).addClass(“retina-icon-2”);
So after a few hours of research I implemented a solution using custom fields. To design my fields and apply them only to certain pages, I used the Advanced Custom Fields plugin. with this I created a set of custom fields for each page type that I needed to which I needed to attach specific … Read more