Custom fields giving no values
-
I have the newest wordpress and polylang 0.82
I have some custom fields on my posts
I load my page with this
query_posts("post_per_page=1&p=38"); the_post();
and trying to echo
get_post_meta($post->ID, "firstabild", true)
it worked great, but my polylang did get a cache-error and I needed to reinstall the plugin, now when I linked those again, it doesn’t give me any value anymore.
<?php get_header(); ?> <!-- index page info--> <div id="slideshow"> <?php if (get_locale() == "sv_SE" ) { query_posts("post_per_page=1&p=38"); the_post(); } else { query_posts("post_per_page=1&p=78"); the_post(); } ?> <?php the_content(); ?> </div> <ul class="container-menu"> <li><a href="#"><img src="<?php echo get_post_meta($post->ID, "firstabild", true)?>test" alt="hem"></a></li> <li><a href="#"><img src="<?php echo get_post_meta($post->ID, "andrabild", true)?>" alt="nyheter"></a></li> <li><a href="#"><img src="<?php echo get_post_meta($post->ID, "tredjebild", true)?>" alt="inspiration"></a></li> <li><a href="#"><img src="<?php echo get_post_meta($post->ID, "fjardebild", true)?>" alt="om oss"></a></li> </ul> <?php get_sidebar(); ?> <?php get_footer(); ?>
Anyone knows a solution?
- The topic ‘Custom fields giving no values’ is closed to new replies.