New answers tagged

0

UPDATE: I've moved the inline css to the index.php. My code looks like this: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <style> .img-right{ width:120px; height:90px; } @media only screen and (min-width:600px) { .withthumb {background-image: url('<?php echo ...


0

At long last, I have identified the issue. The theme I was working in used the Minikit theme starter, which has a function that strips version numbers. function minikit_remove_wp_ver_css_js($src) { if (strpos($src, 'ver=')) $src = remove_query_arg('ver', $src); return $src; } Naturally, the version numbers returned once I stopped calling ...


0

Youre sold items have to be different from the other items (other css class). Then its very easy. So first you need to add the "sold" class to the sold items then your css should work. I think this plugin might implement the feature you need for your woocommerce products but i never used it. https://wordpress.org/plugins/woocommerce-sold-out-products/


0

You could use background-position and just move it out of the view of the element. element.class{ background-position:-9999px; } or element.class{ background:transparent; }


0

It seems you want to hide the logo image that's displayed instead of the site title. Check the image element in source code and then add the custom class to the specific element. A second option would be to create a custom page template, and then use it while publishing that particular page.


1

It should look like this: .page-id-2557 section#title { background: none !important; } This removes the image, then you may want to change the color of the title Which you'd have to also use !important, since this theme uses !important a lot, which isn't great... try to avoid. .page-id-2557 #title.title-area .title-content .title-text h1 { color: ...


1

Just override the background property with the below code in your child css. #title { background: none !important; }


1

Firstly i would say this is off-topic here as it purely relates to css/js, but let me try to give some pointers. Here you markup is : <article> <header></header> <div> .... <p><img class="align-center" src="path/to/img1"></p> .... <p><img class="align-center" ...


0

Florian's answer is probably your best bet because it gives the author the most control as to how the images are aligned so that would be my first answer. However, if you don't trust your authors to align the images themselves then we'll have to go another route. Unfortunately for the reasons you stated above, it doesn't look like we can use the :nth-child ...


0

I think the best way to achieve what you want is to do something like so: <?php // Our custom Loop begins here $ourPosts = array( 'cat' => 317, /* Fetch your category */ 'posts_per_page' => 6, /* Display amount of posts per page */ 'orderby' => 'date', /* Order by date */ 'order' ...


0

Have the writer use the left/right align functionality built into the WordPress text editor. The editor adds alignleft or alignright classes to the aligned images. Way more info can be found in the WordPress codex.


0

If you use wp_enqueue_style(), with your function, you could call the function from the page (single.php etc.) ... pass a string through with the page name, use that in the function to decide which style you are enqueuing. This will then load the script in the head in the correct manner. https://developer.wordpress.org/reference/functions/wp_enqueue_style/ ...


1

This is a shot in the dark because I can't see the site... Check the way your theme uses css to align your sidebar and see if the width that is being set to the div by the user is causing the post container to become too wide, pushing the sidebar down. You could use some css to control elements within the posts container such as: I would try to find the ...


0

You're looking for: underscore S (_S) theme, maintained by WordPress theme itself. Here is the link: http://underscores.me/ Another good one to start is: https://wordpress.org/themes/clean-simple-white/


0

Add the menu_class argument with value of cd-accordion-menu to your code, so that it looks like this: <div class="menu-container"> <nav id="site-navigation" class="main-navigation" role="navigation"> <?php wp_nav_menu(array( 'theme_location' => 'primary', 'sort_column' => 'menu_order', 'menu' => ...


0

You don't generate a WP Loop using wp_get_recent_posts() so get_the_time() won't pull the post date. The post date is available within the array wp_get_recent_posts() returns though: $recent['post_date']. Or you can use the modified date: $recent['post_modified']. This works (tested on my dev site): <?php $args = array( 'post_status' => ...


0

You can do that by by editing the template-tags.php in the inc directory. Find: sprintf( '<a class="entry-date" href="%s">%s</a>', esc_url( get_permalink() ), $output_time ) Replace: sprintf( '<a class="entry-date" href="%s">%s</a>', esc_url( get_permalink() ), $regular_time ) Find: sprintf( '<a class="entry-date" ...


0

Figured this out - had to change the container to hold image widths of 24.9% or 50% depending on layout, remove the clear from both post divs and stretch the .site width to 100%. From there I had either 4 horizontal images or two x two set-up. If anyone has any questions about this feel free to ask.


1

All the information you need can be found here: https://codex.wordpress.org/Child_Themes The important parts to get it up and running would be to: Make sure the parent theme exists (the complete accesspress-lite theme in your case) Create a unique folder name for your child theme. Create a style.css file in your child theme folder. /* Theme Name: Your ...


0

This is an old question, but I just ran into this same issue and found the problem: the MU Domain Mapping plugin is using a deprecated constant, PLUGINDIR, to remap the plugin directories on the mapped domains. The plugin seems to be very vaguely developed nowadays (and no releases have been out for a year), so I just edited my copy of the plugin directly. ...


0

TLDR answer: first parameter of each wp_enqueue_style() should not be left as 'parent-style' and 'child-style'. They should be renamed to match the name of the parent theme and its child. Problem If you don't rename the parameters, you will get the child theme enqueued a second time can result in rules appearing twice in Firebug and changing values in the ...


1

I agree with @Zlatev that you probably wouldn't want to do this clientside. There are easier ways to include less. There are plugins that allow you to do this. Even jetpack has less support. If your goal is to include this in your theme you can use wp-less. Just download that plugin and drop in somewhere in your theme and include it in your ...


0

In /wp-content/themes/centric-pro/style.css, delete line 88 through line 113 this removes all the font-face declarations. On line 88 paste the following: @font-face { font-family: 'GothamRounded-Bold'; font-style: normal; font-weight: 400; src: url('fonts/GothamRounded-Bold.eot') format('embedded-opentype'), ...


0

This should do it for you. @media screen and (min-width: 59.6875em){ .site-title { display: none; } } I'm new here so I'm not sure why the downvotes.


-1

echo '<a href="' . get_permalink() . '" class="htitle">Anchor Text</a>';



Top 50 recent answers are included