Jonas_
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Custom post layout?anyone know that?
and how i access them ?is this the best way: get_post_meta($post->ID, $key, true);
or should i use the cache variable? $post_meta_cache[256][‘key’];i will use it in a the page with the full post on
Forum: Fixing WordPress
In reply to: Custom post layout?Ok perfect i’m going to check it out!
Thank you very much!
Just one more question.. the [Plan] is that the key in the meta?
and what if i want spaces, is that possible? or do i need to use _ or – instead of spaces?Forum: Fixing WordPress
In reply to: Custom post layout?But if i want a page with all posts that have key X, do i need to loop through all posts to get them? The reason why i ask this is performance.
They say on the page $post_meta_cache contains all the posts numbers with their corresponding keys and values.
Like a page where all posts are that all have key “place” with value “nowhere” for example..
Is that the same way as we list items in a category? I think the posts are stored in db per category or isn’t that true??? So i will need to make for each item also a category to do this efficiently? Or am i wrong?
Forum: Fixing WordPress
In reply to: Custom post layout?Ok that is very interesting i gonna try it soon! Thanks!
Forum: Fixing WordPress
In reply to: Custom post layout?Ok thanks, but i don’t understand how i need to format the post itself
i think i need to use a template file like single-mypostlayout.phpif i use the plugin custom field template.. once i press post what happens then? Do i need to store the items in the database or does this happen automatically? And how do i apply a layout? I will use a simple definition list for this and a few h3s to create sections..
Thanks in advance!
Forum: Fixing WordPress
In reply to: How do i make a list of all posts on a page?haha yes indeed!
many thanks!
Forum: Fixing WordPress
In reply to: How do i make a list of all posts on a page?for some reason it doesn’t work… it only shows 1 post, twice..
what can be the problem?
Forum: Fixing WordPress
In reply to: How do i make a list of all posts on a page?oh ok man thanks for explaining!
Forum: Fixing WordPress
In reply to: How do i make a list of all posts on a page?i don’t understand what i have todo with the WP Query?
Anyone can help me out?
function create_post_list() { $text = ''; if ( have_posts() ) : while ( have_posts() ) : the_post(); $text = the_title('<h2>', '</h2>'); $text .= get_the_content(); $text .= '<br />'; endwhile; endif; return $text; } add_shortcode('post_list', 'create_post_list');
Forum: Fixing WordPress
In reply to: How do i make a list of all posts on a page?i tried using the functions class:
function create_post_list() { $text = ''; if ( have_posts() ) : while ( have_posts() ) : the_post(); $text = '<h2> the_title(); </h2>'; $text .= the_content(); $text .= '<br />'; endwhile; endif; return $text; } add_shortcode('post_list', 'create_post_list');
but for some reason it doesn’t work when i add [post_list] to my page.. what is wrong?
Forum: Fixing WordPress
In reply to: How do i make a list of all posts on a page?when i add that to my page (in the editor in html tab) it shows that code, how do i fix that?
Forum: Fixing WordPress
In reply to: Adding thumbnail image to each categoryindeed ?? i’m creating everything from scratch and you learn very fast here ??
Forum: Fixing WordPress
In reply to: Adding thumbnail image to each categoryseriously i didn’t know it was so easy to do this lol ??
wordpress is a very nice cms ??Forum: Fixing WordPress
In reply to: Adding thumbnail image to each categoryokay, but i thought because its almost the same as the original, basically only adding the image, i could c&p it but not ??
I’ll try it from scratch then
Forum: Fixing WordPress
In reply to: Adding thumbnail image to each categoryI’m not really messing with the core code… i’m copying it so i can create my own function to override the default one… but i’ve to change things there but i’m not sure what..