New answers tagged

0

If your theme has body_class() in the body tag (normally in header.php) then the category name is added to the body tag as a class e.g. <body class="my-category"> So in a css file you can do .my-category #my-element { background:#FF0000; } To edit the html for the categories to make them card layouts then you would need to edit the category.php ...


1

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


0

Gradient and boxshadow are fine to put inline. Your trouble will be with the hover states. Luckily there is a trick. You can put the hover styles in an outer element and force inherit on hover. Like this: <div class="myshortcode"> <a style="color:blue;"><span style="color:red;">Content</span></a> </div> In your ...


-3

I have just discovered what the issue was. In my functions.php I was still calling my less.min.js, which was applying the style for some reason, removing that resolved my issue. Thanks!


0

Use this in your css img.social-links { float: right; clear: right; }


0

Every post has a maximum of one format and one status. To echo the format you need: if (get_post_format($post->ID)) echo '<span class="format-' . get_post_format($post->ID); . '"></span>'; To echo the status you need this: if (get_post_status($post->ID)) echo '<span class="status-' . get_post_status($post->ID); . ...


-1

<span class="<?php echo get_post_format_string('video'); ?>"></span> <span class="<?php echo get_post_format_string('status'); ?>"></span> It will use post format as a class. You can check all post format string through this code function get_post_format_strings() { $strings = array( 'standard' => _x( ...


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 ...


0

If you want to modify the main <header> output take a look at header.php. This file will be called before the other templates. If you want to modify the template that is used to display your latest blog posts, index.php would be the file of choice. Index.php is also the fallback template for any post object so you might want to let it as it is to ...


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 ...


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, ...


0

Yes you can for example target the link itself inside the trending id with CSS and remove the action with CSS itself, in your place it would be something like this: #trending > li.product > a { pointer-events: none; cursor: default; } Note that this is CSS scheme, not exact CSS, that deppends on classes you have (I would be more specific if ...


0

You can do that with css - the form is hidden by default, but can be targeted like this: .woocommerce-checkout form.checkout_coupon{ display:block } (put that in style.css)


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 ...


0

Its wordpress feature to add <p> tags automatic, so that a non programmer who don't have knowledge of html tags also can publish posts/pages on wordpress. Wordpress arranges tags for them. However this feature also becomes trouble (In some cases) for programmers to set up pages. So there are 2 ways to handle this issue. First: ...


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 ...



Top 50 recent answers are included