Hot answers tagged

2

The closest to a reference technique in core would be [gallery] shortcode. If you look at the source of implementing gallery_shortcode() function you'll see that it: Generates instance number (so multiple shortcodes can be distinguished). Outputs dynamic CSS inline into a page source, for each instance. I wouldn't consider it particularly neat solution, ...


2

You shouldn't be putting arbitrary HTML into post content, instead use shortcodes! Shortcodes were intended for this situation. Otherwise you face 2 problems: Filters will escape your content via the wp_kses_post on output TinyMCE will filter/mangle/strip tags when you use the visual editor, even for the slightest of moments All of these are done for ...


2

Implementing your own upload form like this can be a major security vulnerability, you might want to instead use a library/script where such potential issues are already dealt with properly. Here is one I remember using successfully on a project for a similar purpose (user uploaded video)... though it may be more than what you need, it does have more ...


1

You have a spelling mistake in your CSS. .commentlist should be .comment-list


1

You can also try <span class="<?php echo get_post_format($post->ID); ?>"></span> Additional details available here Edited from here: Well according to the link I provided, get_post_format() give you the post format post the post_type post. So if you want to use it in loop, you could try while ( have_posts() ) : the_post(); echo ...


1

Look in your theme structure, if it has single-post.php or single.php you can edit it, it shouldn't change the pages (but keep a backup just in case) If you don't have these, create it alternatively, if you only want it to work for a certain type of post, create a custom post type (you can do it manually or using a plugin such as ...



Only top voted, non community-wiki answers of a minimum length are eligible