HI all, how can I change bloginfo variables especially bloginfo('stylesheet_url')in HEADER.PHP in the theme folder.?
in fact I want a way to use the rtl.css with style.css to make the alignment from right to left.
thank you
HI all, how can I change bloginfo variables especially bloginfo('stylesheet_url')in HEADER.PHP in the theme folder.?
in fact I want a way to use the rtl.css with style.css to make the alignment from right to left.
thank you
<?php bloginfo('template_url') ?>/rtl.css
thank you.. I added your line in the header.php in the theme. and many elements became right. in the other hand there is not any effect of dir="rtl" in the html tag !!
also I noted there are many css files with rtl suffix in the wp-admin. But I don't know how to use them or how to let the design of the control panel take care of them .. any idea ??
If you want to actually change it:
Add the following code to your functions.php file.
add_filter('stylesheet_uri', 'change_css');
function change_css() {
return "http://website.com/yourcssfile.css";
}
WordPress loads the functions.php file prior to loading the template files. The add_filter we use here modifies stylesheet_uri, so when it gets called within your template, it will be the path you specified.
You can do this with most bloginfo variables.
View wp-includes/theme.php if you are curious what else can be modified, anything with "apply_filters("whatever")....." can be modified, just replace whatever with what you're modifying in your add_filter.
Good luck
Perhaps this is a better example:
add_filter('stylesheet_uri', 'change_css');
function change_css() {
return get_bloginfo('template_url') . '/my_custom_stylesheet_name.css';
}
This topic has been closed to new replies.