CSS styling specific category (change logo/title) - css

I have created an alias domain to my old blog https://londonim.co.il/ so it will handle on the cycling related content under the domain: https://cyclondon.co.uk
I have managed to change the logo to the new hompage by creating a static page (and redirecting any traffic from https://cyclondon.co.uk to it.)
I have used this CCS:
/*cycling */
.page-id-3811 .cutewp-logo-img-link {
content: url(https://londonim.co.il/logo_cycle.png);
}
My question is as followed:
when i try to give any post from "cycling" category the same logo, nothing seems to open.
this is the code that is not working:
.category-cycling .cutewp-logo-img-link {
content: url(https://londonim.co.il/logo_cycle.png);
}
And also a followup if you may:
no matter what I do, whether i used cyclondon.co.uk or londonim.co.il I am getting the same website title from the Wordpress definition. Is there a way to define a custom web title for a specific page, similarly like changing the logo?
Many many thanks!

Have you tried throwing an !important on the end -
.category-cycling .cutewp-logo-img-link {
content: url(https://londonim.co.il/logo_cycle.png)!important;
}

Related

How do i remove gravatar completely from wordpress?

Hi I'm trying to to remove gravatar completely for my website. I've already disabled gravatar on the discussion page setting of wordpress. However, I'm using a paywall plugin which uses gravatar (called memberful) and its account popup always shows the profile avatar regardless if its disabled or not on the discussion page.
Example:
I think the profile-window is actually an iframe...
To here: https://dylogue.memberful.com/account/subscriptions
Do you have access to this endpoint, or is it created by a script? Changing the general CSS wont help you if you do not have access to inserting css into this endpoint.
The stylesheets are in weird places:
https://d1zgk03a9fsd43.cloudfront.net/assets/reach/style-4556bac86321e164130eb81bc9c1bd3e8ad4f00e3a7f1b803ef1e7e272baf184.css
https://d1zgk03a9fsd43.cloudfront.net/packs/member-bafbfb186fc0b252fb994416a369b793.css
I didn't see the link to create an account and test this, but does this CSS work?
.memberful-account-header img {
display: none;
}
.memberful-account-header hgroup * {
margin-left: 0 !important;
}

Trigger a class to hide meta-data of posts on WordPress blog page

Basically on my bakery's WordPress blog page http://www.omigretchen.de/novedades/ I would like to hide the meta data displayed below each post preview. Usually I always succeed in using the console and trigger the class.
As it shows in this case I use a display:none on the class .entry-meta. Nevertheless it does not work. Does anyone has an idea what to do?
Are you certain that you've added .entry-meta { display: none; }? Because I don't see it. Make sure you put it where it'll be printed to the page.
A better way to do it is by editing the archive.php and either remove or comment the code that prints the entry-meta block.

Trying to change CSS on New-Post page (WP-admin)

I’m inside the New Post page on WP-Admin, where you can create a new post.
At the right column, there’s the category selector, in which you select the category for that new post.
I have something like 15 categories, and therefore the category box is showing with a scrolling bar. Since I need to automate some post creation, I need all the categories to be visible right away, without having to scroll.
So I found the css file that manages the height of the category box (it’s inside /wp-admin/css/edit.css and //wp-admin/css/edit-rtl.css) and there I changed the CSS files to allow a bigger height by default on that box.
However when I open the new post page, it still shows the small box in categories, and when I see the CSS rule, the change I made is not visible. It’s like the CSS is cached or something. I already made sure that my browser is not caching it.
The problem I think it’s because the CSS rules are not pulled directly from CSS files, but from this file:
http://www.website.com/wp-admin/load-styles.php?c=0&dir=ltr&load%5B%5D=dashicons,admin-bar,buttons,media-views,common,forms,admin-menu,dashboard,list-tables,edit,revisions,media,themes,about,nav-menu&load%5B%5D=s,widgets,site-icon,l10n,wp-auth-check&ver=4.7
That file seems to go and gather the CSS information from some place (which I assumed was the CSS files in the wp-admin/css/ folder, in which I could find the exact same CSS rules that were applied to the category box) but for some reason, it’s not retreiving the updated CSS file. Or something else is happening (Server side caching the PHP response and therefore retreiving all the time the old response?)
I wouldn't recommend tampering with core admin files, as any changes you make could be lost from a WordPress update.
The proper way to do it is through a custom function added to your theme or child-theme functions.php file:
add_action('admin_head', 'custom_admin_css');
function custom_admin_css() {
echo '<style>
/* remove scrollbar from categories panel */
.categorydiv div.tabs-panel { max-height: none !important; }
</style>';
}
Another options that will allow you to have CSS for individual pages is to use this OH header/footer plugin. Once you install the plugin you can then add your CSS in the header textarea of the pages admin. Just make sure you enclose your CSS within a <style></style> tag.

How to have a text-only view of a WordPress website in addition to the fully themed view?

I have a client who is interested in having a text-only view of their website available to visitors with accessibility needs. This would be in addition to the usual, fully themed view.
I like what the Kennedy Center did for text-only view, www.kennedy-center.org/text. I like how it appears to the user as a subdirectory, but I am trying to figure out how to accomplish that in WordPress. Two themes? Subdirectory? Session cookie? Intercepting the URL and loading different stylesheets?
Any suggestions or any built-in capability that anyone can suggest?
Thanks...
...Allen
A very fast way to go is to set a cookie and a GET variable.
Basic example:
In function.php:
if (isset($_GET['text'])) {
setcookie("is_text", 'true', time()+60*60*24*365*10,"/");
}
In header.php:
if (isset($_COOKIE['is_text'])||isset($_GET['text'])) {
// text CSS stylesheet
} else {
// standard CSS stylesheet
}
So you can switch the view in every page just by adding ?text to your url.
Try to use Theme Switcher plugin.
See here for the demo: http://www.nkuttler.de/wordpress-plugin/theme-switch-and-preview-plugin/

Drupal 6: Theme Developer gives too common candidate name, nothing specific

I'm working on a restaurant directory site. I have restaurant details page that I need to implement gmap, slideshow, etc. So I need a specific page.tpl and Theme Developer gives the info as below
alt text http://img.skitch.com/20100708-b9af98fb8mpckai5wfpmktxwgf.jpg
but site's about us, contact us, faq, etc pages has same candidate name as page-node.tpl.php . So I can't use that :/
Why isnt there anything like page-restaurant.tpl.php
how can I solve this? Appreciate helps so much! thanks a lot!
[SORTED]
<script type="text/javascript">
window.onload = function() {
load();
}
window.onunload = function() {
GUnload();
}
</script>'
If you are just wanting to add Javascript code, you can use the CSS class provided with most themes. For example, Zen will give you
<body class="not-front logged-in node-type-restaurant two-sidebars page-restaurant">...</body>
which you can detect with jQuery as
$(document).ready() { $('.page-restaurant').Myfunction(); }
Regarding slideshow, I've had good luck with Views Slideshow, which provides a block you can just place in a region on your page.
We had a similar question yesterday.
The logic of drupal is that the page should be for the common elements of a page accross all types of page and content types. Page is the top level template, if you are trying to change that per content type you may not have seperated your theme correctly. You have node theming for differentiating between the different types of node. The format is node-[NODE TYPE].tpl.php
Have you created a content type "restaurant"? If you do this, you may find modules like gmap will help you out.
Add the following function to your template.php file. Replace "themename" with the actual name of your theme. This assumes you've created a separate content type for "restaurant" - I gather you have from the previous answers and comments. You'll get an option to use page-restaurant.tpl.php once you upload the edited template.php file and refresh the theme registry.
function themename_preprocess(&$vars, $hook) {
switch ($hook){
case 'page':
// Add a content-type page template in second to last.
if ('node' == arg(0)) {
$node_template = array_pop($vars['template_files']);
$vars['template_files'][] = 'page-' . $vars['node']->type;
$vars['template_files'][] = $node_template;
}
break;
}
return $vars;
}

Resources