I have tried overriding all of the following templates:
page.tpl.php
region.tpl.php
block.tpl.php
node.tpl.php
I still at the top of my content region have the following markup:
<div class="field field-name-field-content field-type-text-long field-label-above"><div class="field-label">content: </div><div class="field-items"><div class="field-item even">
Each of the above templates have nothing but the very minimum to spit out $content usually.
What am I missing?
Sounds like you're looking for field.tpl.php. It's one of those template files, like html.tpl.php, that common themes sometimes don't provide default implementations for, so it falls back on the "hidden" implementation that lives in modules/field/theme.
Related
I have a newsletter sign up form on a site and I can't seem to figure out why the email section input type is set to 'tel' meaning on mobile, users get only access to the numerical keypad and not the actual keyboard. I am quite new to this, which is why I am after some help.
It is the homepage to, the subscribe form down the bottom: https://www.australianwildlife.org/
Can someone please advise how I might be able to change it to input ="email"? I have attached a screenshot where I can see it is set to input="tel"
Here is the contact form 7 code:
<div class="form-content">
<div class="subscribe_form">
<div class="row">
<div class="col-md-4 col-lg-3">
<div class="form-group mb-20">
[awctext* first-name label "First name"]
</div>
</div>
<div class="col-md-4 col-lg-3">
<div class="form-group mb-20">
[awctext* last-name label "Last name"]
</div>
</div>
<div class="col-md-4 col-lg-3">
<div class="form-group mb-20">
[awcemail* email label "Email"]
</div>
</div>
.col-md
[submit class:bttn class:secondary-alt1-bg class:btn class:radius-none class:white-color class:submit-btn class:ripple "Subscribe"]
Site
I think this is part of your theme, not so much part of contact form 7. The shortcode starts with awc, which should stand for Australian Wildlife Conservancy. Somewhere in the theme’s files these shortcodes are added. The bug should be in there.
You can start searching for awcemail on your file system in both the wp-content/themes folder and wp-content/plugins folder (since it might have been implemented in a plugin). If you cannot find it, try searching for the add_shortcode and see whether you can find out whether awcemail is a shortcode and where it is added. You can also do a file search for the following:
type="tel"
type='tel'
If that doesn't work you should found out how the code for your contact form is actually parsed. If you know which file(s) are responsible for that you might find in them where the [awcemail part is converted to the actual html.
If that doesn't work, get in contact with the developer, or post (parts of) the code in a github, for example, so we can examine it. I'm sure that if you post all the code, we are able to help you fix this bug, but that is up to you, of course.
I am using a WordPress theme named "Delaware" which utilizes WP Bakery as its page builder.
The issue with it is that some of their custom elements in WP Bakery don't offer the option to change the heading tag.
Is there any way I can change it by editing the core files or theme editor?
Here's what the inspect element shows:
<div class ="box-title"><h2>Chloe Smith</h2><div class="border"></div>
Or how can I locate the file from where it is coming so that I can edit it?
Domain name: aidenfinserv.com
It is not easy to locate your file unless you give access to a developer. You probably need to make use of add_filter for one of the hooks using this code: https://kb.wpbakery.com/docs/filters/wpb_widget_title/ which goes into your functions.php
I also have a vanilla JavaScript solution for you at the moment which I have tried. You can paste the JavaScript part in your Theme options custom JS or script.js file.
const boxTitlesh2 = document.querySelectorAll(".box-title h2");
document.addEventListener("DOMContentLoaded", () => {
boxTitlesh2.forEach((boxTitleh2) => {
const boxTitleh3 = document.createElement("div"); // Replace with your custom element
boxTitleh3.innerText = boxTitleh2.innerText; // You can replace it with your custom text.
boxTitleh3.setAttribute("class","custom-heading"); // Better for styling purposes
boxTitleh2.insertAdjacentElement('beforebegin', boxTitleh3);
boxTitleh2.remove();
});
});
<div class="box-testi" style="">
<div class="box-title">
<h2>Prisha Matondkar</h2>
<div class="border"></div>
<p class="sub-title">Sydney, Australia</p><span class="dl-icon-quote svg-icon"></span></div>
<p>Highest Quality Accounting Services, They'll Assign Dedicated Accountants to you unlike some other companies. And The Accountants were always cheerful to Listen to my queries. Will Prefer Aiden Finserv instead of hiring our own accounts team</p>
</div>
<div class="box-testi" style="">
<div class="box-title">
<h2>Chloe Smith</h2>
<div class="border"></div>
<p class="sub-title">Chicago, USA</p><span class="dl-icon-quote svg-icon"></span></div>
<p>Aiden Finserv Client Dashboard for accounting services is one of the most unique things among any Accountant Firm. I can manage everything and its easier to have everything stacked up in one place. I have worked with 8+ Accountant firms and has never
seen anything like this.</p>
</div>
Live output:
i have created some basic shortcodes [row],[cols] and [img]. I can use them like:
[row cols="2" ]
[col cols="2"]In faucibus[/col]
[col cols="2"][img src="../wp-content/uploads/2014/08/32-300x300.jpeg"] [/col]
[/row]
What this makes is simple, create the following bootstrap structure:
<div class="row">
<div class="col-lg-6 col-sm-6 col-md-6 col-xs-12">In faucibus</div>
<div class="col-lg-6 col-sm-6 col-md-6 col-xs-12"><img src="../wp-content/uploads/2014/08/32-300x300.jpeg\"" alt="\"\""></div>
</div>
I have made this with do_shortcode($content) because in one shortcode can be another shortcode.
The question:
Is possible to take the html result and converted back to shortcode format based on the shortcodes functions i have already defined?
Thank you:)
I've been having the same problem to a simple front-end editor I'm building. I find Visual Composer very large for simple projects.
A possible solution is to use jQuery to read the attributes and contents of, say a div, and generate the resulting shortcode. So, in your case take the values of 'class' and convert to shortcode equivalent.
I hope this helps!
I would like to render a list of Plone Archetypes in custom template.
In my example, I'm searching 'PortletPage' type in the catalog and get 3 items.
Then I iterate on these items and i'd like to display them.
Is there a way to do that ?
I'd recommend looking at the documentation for Plone's TAL templating language as well as the portal_catalog tool.
Here's a quick example based on the issue you're describing:
<div tal:define="catalog context/portal_catalog;
results python:catalog.searchResults(portal_type='PortletPage');">
<div tal:repeat="item results">
<h3 tal:content="item/pretty_title_or_id" />
<p tal:content="item/Description" />
</div>
</div>
I was just wondering how to remove the default theming divs of a field in Drupal 7, from within a module (so not with a theme function!!).
In my case: I implemented my own field in a module, now I'm using hook_field_formatter_view to display it. I read here that you can implement your own MYMODULE_theme() function in your module to declare a new field formatter.. but some default divs are still there:
<div class="field field-name-field-myfield field-label-above">
<div class="field-items"> <-- this one
<div class="field-item even"> <-- and also this one
<div id="my-own-field-div">
Is there a way to hide/edit them? I know of the template functions but its better to have the code inside the module..
I think you should try Fences.