Using theme options to change link colours

To make theme options for css, you include the css in the header. on wp_head… For instance, I have set up various options in my admin menu in an array. ‘name’ => __( ‘Custom CSS’, ‘voodoo_lion’ ), “desc” => __( ‘Want to add any custom CSS code? Put in here, and the rest is taken … Read more

Remove “Category Archives: title” at the top of a category page [duplicate]

The text is coming from Twenty Eleven theme’s category.php file. There are two ways to remove it: A) Removing it using a Text/CODE Editor on the File System/FTP: This is the recommended method Go to Your WordPress Installation Folder. Then wp-content/themes/twentyeleven folder. Then open the category.php file in a Text or CODE Editor. On line … Read more

How to Edit the Order of Global Colors in Elementor? [closed]

The solution I’ve come up with: This can be done from within the database. You will want to look for _elementor_page_settings inside the wp_postmeta table. The meta_value will be serialized data, so save a copy of the _elementor_page_settings data before making an edit. In your data, say you have the following: {{i:0;a:3:{s:3:”_id”;s:7:”de51da3″;s:5:”title”;s:6:”Blue 2″;s:5:”color”;s:7:”#123456″;} i:1;a:3:{s:3:”_id”;s:7:”de51da3″;s:5:”title”;s:6:”Blue 3″;s:5:”color”;s:7:”#123456″;} … Read more

How to Handle CSS for Multiple Header header.php Files?

That’s not how you use get_theme_file_uri(); You need to specify the directory RELATIVE to your currently active theme’s directory. So for example, if your currently activated theme is rm-acf1, and all of your custom header CSS files are located in the subfolder hdr-styles. This is your theme directory: ./wp-content/rm-acf1/ This is your header styles directory: … Read more

What are the options for running custom css and javascript files on a page?

You can use WordPress built in functionality Function Reference/is page and attach a if statement in your script_enqueue() function in your functions.php file. Read more in the Codex: https://codex.wordpress.org/Function_Reference/is_page Here’s an example from a theme I’m building: if (is_page( array(‘mortgage-calculator’, ‘contact’ ) )){ wp_enqueue_script(‘angularjs’, get_template_directory_uri().’/js/angular.min.js’, array(), ‘1.4.1’, true); wp_enqueue_script(‘d3′, get_template_directory_uri().’/js/d3.min.js’, array(), ’10/22/2015′, true); wp_enqueue_script(‘c3-js’, get_template_directory_uri().’/js/c3.min.js’, … Read more

Multisite configuration fails with css/js files

The problem was in the .htaccess file the installation script generated. Specificaly, those two lines: RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) home/itaymoav/dev/lmspages/$2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ home/itaymoav/dev/lmspages/$2 [L] The path in there is the actual path to the files. While it had to be the relative path from root dir of the worpress installation. Or, to put it simply: RewriteRule … Read more

Twitter Bootstrap Use Collapse in Custom Post Type

The script First you have to enqueue the script. We conditionally load it only for your custom post type and its archive(s). // in your functions.php function wpse69274_enqueue_tbs_collapse() { if ( ! is_post_type_archive() AND ‘YOUR_POST_TYPE’ !== get_post_type() ) return; wp_enqueue_script( ‘tbs-collapse’ ,get_stylesheet_directory_url().’path/to/your/collapse.js’; ,array( ‘jquery’ ) ,filemtime( get_stylesheet_directory().’path/to/your/collapse.js’ ) ,true ); } add_action( ‘wp_enqueue_scripts’, ‘wpse69274_enqueue_tbs_collapse’ ); … Read more

wp_tag_cloud inline CSS

Add a filter for the tag cloud in your functions.php: add_filter( ‘wp_tag_cloud’, ‘wpse_50242_unstyled_tag_cloud’ ); /** * Change tag cloud inline style to CSS classes. * * @param string $tags * @return string */ function wpse_50242_unstyled_tag_cloud( $tags ) { return preg_replace( “~ style=”font-size: (\d+)pt;”~”, ‘ class=”tag-cloud-size-\1″‘, $tags ); } In your template you call the tag … Read more

CSS for Custom Post Types

In your post loop, you could always set a class name that is the equivalent to the slug of the custom post type and then adjust the css accordingly. You’d need to add the post_class() function to the html element containing each post. For this option, you’ll want to get the post type first: <?php … Read more

How to change the order of the comment_form fields with css?

You could use flexbox instead of table if wanting to do this with css. Flexbox lets you order elements easily: #commentform { display: flex; flex-flow: column; } .comment-form-comment { order: 1; } .comment-form-url { order: 2; } .comment-form-email{ order: 3; } .comment-form-author{ order: 4; } .form-submit{ order: 5; } Here’s an example: http://codepen.io/candid/pen/NxKJyW/