Drupal search module - drupal

Does anyone know how to remove markup from the theme search box? It produces a lot of extra DIVs and CSS id's.
Thanks, Mark.

It is very easy thing to do.
First, search your theme (/sites/all/themes/yourtheme). Do you have search-block-form.tpl.php? If so, you can edit it according to your own fashion.
If you don't have search-block-form.tpl.php, you can create it. Follow the very simple instruction in: http://www.bananatools.com/drupal/customizing-search-block-form.html to create it and afterwards change it as you like.

Assuming you installed a custom theme, go to /sites/all/themes/yourtheme and edit the .tpl.php and .css files. If you didn't install a custom theme, you can't re-theme it without making a huge mess.

Related

How to change the woocommerce email template width?

I am trying to increase the email template width. And I am trying to modify the email-style.php, but it seems no way to change. How can I change it?
Thanks a lot.
The most useful one to copy is emails/email-styles.php and there you'll find the width is defined in two places at 600px; #template-container and #template-body but there's also all the other styles. Anything that is not defined but exists in the email can be added to this file.
I use an email preview plugin so I can see the effect in a web inspector.
if you wanted to be really clever you could include an external css file and then use scss to integrate with the rest of your site styles - eg colours.
The easiest and most common approach to do is to create a folder in your theme called woocommerce/ and then copy the entire templates/ directory from your woocommerce plugin or github into that. This will override the functionality from the plugin.
Here you can find the hardcoded table width.

Events manager - child theme not working

I am trying to make changes to plugins/events-manager/templates/forms/event/bookings.php via my child theme. When I make changes to the file directly in the plugin, it works well, but I know the way to go is to make changes at the child theme level so this is what i have done:
I added the edited bookings.php to twentytwelve-child/plugins/events-manager/templates/forms/event/bookings.php but for some reasons the changes are not applied.
I have also tried to add the edited bookings.php to twentytwelve-child/events-manager/templates/forms/event/bookings.php but it is not working either.
I would appreciate if someone could help me figure this out (screenshots below). FYI - I am not a developer, so please try not to be too technical in your answers.
Many thanks,
Yvan
It would be nice if developers could simply override a specific file within a plugin from within their theme, but I'm pretty sure WP doesn't work that way (At least not for overriding plugins. Theme files? Yes. Plugins? No).
If the plugin developer was nice they will have given you some override capabilities like using action hooks, filters, or including their function as static within a class.
From the looks of the events-manager plugin file there are three such action hooks available:
do_action('em_events_admin_bookings_header', $EM_Event);
do_action('em_event_edit_ticket_td', $EM_Ticket);
do_action('em_events_admin_bookings_footer', $EM_Event);
You will either need to hook into these actions to make your adjustments (highly recommended), or duplicate the plugin, rename it, and edit it manually (which means you will need to duplicate these edits every time you upgrade... YUCK!)
EDIT after further researching the events-manager plugin:
While WP doesn't provide this template override functionality, it looks like the plugin does. However after some digging in the documentation I noticed that this functionality doesn't specify weather it supports child themes. Try placing the template override within twentytwelve instead of twentytwelve-child. If that works, then maybe you could move that folder back into twentytwelve-child and create a symlink within twentytwelve to the real folder in twentytwelve-child (sort of tricking the plugin). Doing it this way means you have to recreate the symlink each time you update twentytwelve, but the trade off is that you can now override templates and won't loose your changes if you update twentytwelve (just the symlink).
The problem is your file path:
plugins/events-manager/templates/forms/event/bookings.php
should be
plugins/events-manager/forms/event/bookings.php
If you have issues with EM we monitor the free forums here (I stumbled on this by coincidence) - https://wordpress.org/support/plugin/events-manager
also #StevenLeimberg, thank for chipping in! we do support child themes it was just wrong directory structure.

Subclassing or exentending djangcms plugin

I use the cascade bootstrap plugin and like it very much. Now i need to add additional classes to the rows and columnes for styling it more precisely via css. I would like to add style or id -fields to the cascade plugin. I thought the simpliest way is subclassing the cascade plugin but I cant find any way for doing this and I dont find the right place in the docs. Maybe you can give me a hint or point me in the right direction.This is my first djangocms project, I moved from zope.
Any tip or help is appreciated!
Regards,
Klaus
The CSS files that need to be overwritten are in static/css for whatever framework (Bootstrap/Grid System 960) that you want to use. I suggest creating a custom file and including it after the vendor CSS files, leaving them as-is, and have yours overwrite theirs.
See their documentation. In case the link changes: http://djangocms-cascade.readthedocs.org/en/latest/tutorial-bs3.html
They maintain Bootstrap's typical classes for structures, you could probably include a theme from Bootswatch

Website magento theme install didn't go as planned

So, i'm building a website using magento, i tried to install a theme but there are some files that dont seem to be loading, including some css, i'm gonna list the website and the demo of the theme so you guys can tell me if you see something where you can help:
The website
The Demo
As you can see, there is a lot going wrong... the name of the divs isnt even the same, i have followed the readme tutorial and done this multiple times, the theme was installed using magento connect.
I've done the whole System>Configuration>Design and pointed to the new theme...
If you could give me some clue about what's wrong, i'd be very thankful, any further details needed, just ask.
Package from Magento Connect includes only design and skin files without WebAndPeople Custommenu extension.
Which names of divs do you see as not similar? I installed this theme for test and it is similar to yours with div names. Don't look on the devdemoz.com's demo because it is modified theme and is not original that included in package! You can compare their style.css and your with diff or notepad++ to find differences (about 20% of original skin).
Footer. You made mistake in HTML code and placed tag <h3> outside of <ul>. Just move them one line down like in /readme.html file.
If you wish to use modified mobileshoppe demo from devdemoz.com you can simply grab their style.css and images and put in your folder.

Most productive (Effective-efficient) way to find php code

I am modifying someone elseĀ“s theme. The way I am doing it is looking for the source code to find where it is located and modify it. I am using grep to find the html ids and classes on the theme folder. It takes sometime and I am not sure if there is a better way.
Is it there any other way on locating/modifying code in wordpress?
ps: I am using a child theme for the changes.

Resources