How to add/insert a class to a sidebar in single.php?

How can I accomplish this in the most efficient way? As Rarst indicates, don’t change the class to change the style. Leave the class the same and use CSS Specificity to change the style on certain pages. When WordPress creates a page in a theme that uses the body_class() function it adds a lot of … Read more

CSS is not loaded on mobile devices

After investigation and talking with some sysadmin friends, it happened that there was a .htaccess with rewrite rules for mobile devices in the root of WordPress, in wp-content and in all folders in themes and plugins. I removed all the .htaccess, refresh the root .htaccess with only wordpress needed stuff and everything is good now. … Read more

Adding elements to wp_list_pages (within , but before )

If I Understood your question right, instead of wp_list_pages, you can use a custom query using get_pages e.g. $args = array( ‘sort_order’ => ‘ASC’, ‘sort_column’ => ‘menu_order’, ‘hierarchical’ => 1, ‘exclude’ => ”, ‘child_of’ => 0, ‘parent’ => -1, ‘exclude_tree’ => ”, ‘number’ => ”, ‘offset’ => 0, ‘post_type’ => ‘page’, ‘post_status’ => ‘publish’ ); … Read more

styling isnot working in wordpress theme

Having template files in different folders has nothing to do with styles not working. View page source and make sure the right stylesheet is loaded. If its loaded, then double check if there is any other rules thats overriding your needed rules for specific class. Try adding !important to the css definitions and see if … Read more

Change the search icon in twenty fourteen

This is more of a simple CSS question than actually related to WordPress. However, you need to change your style.css. As TwentyFourteen does not use images, but pseudo css-classes, you need to change this as well: .search-toggle { background: #fff url(‘http://www.citizen-science.at/wordpress/wp-content/themes/cs/img/search-icon.png’) no-repeat; background-size: 30px; background-position: 10px; } .search-toggle:before { content: “”; } By the way, … Read more

How to add class to an html output element in tinyMCE paragraph drop down menu

In my opinion, using the Styles dropdown is useful to show that the particular style you are adding is special and not the theme’s standard element styling for p, h1, h2, etc. The examples in the Codex to be pretty good at outlining this: http://codex.wordpress.org/TinyMCE_Custom_Styles // Callback function to filter the MCE settings function my_mce_before_init_insert_formats( … Read more

Using css class selectors on a specifc page [closed]

This is off-topic, as it’s a CSS question, not a WordPress question. That being said.. You need to attach your class to your tag. Use: img.activities { /* stuff here */ } Your current CSS selector targets this: <span class=”activities”> <img src=”https://wordpress.stackexchange.com/questions/145611/image.png”/> </span>