Wordpress - Which file outputs the entire HTML Document content? - wordpress

I am looking for the file that outputs the entire HTML Document from <!DOCTYPE html> to the </html> tag to the screen, including the header, footer and the page content.
I know that pages are powered by template files, and header and footer have their own files (header.php & footer.php)
But which file outputs all of it on the screen?

It completely depends on the page being viewed. Take a look at this WP template heirarchy document to see which top level template is used for which page type.

Related

How can I add a css file into my TinyMCE template?

My question is about Tinymce Template Plugin.
I have been developing a CMS with ASP.NET MVC. I can insert a template by using “insert template plugin”, but I can not insert a css file.
The template I will insert should be more developed. When I add a css file, it does not work. For example, <link rel=“stylesheet” type=“text/css” href=“theme.css”>. This link is my template I want to use.
And then I am saving this content into my database. This link can not be saved into my database. It can not be seen.
I used content_css ,the template looks good in the editor, but when I look at the page, it looks very bad because the css files does not work. In addition to all of these, when I look at the table of database (column : content) there are not css links (<link href...)
What should I do for this problem ? Thanks for your help.
CSS links belong in the head of the document, it is not valid HTML to add the link tag to the body. The Template Plugin allows you to add fairly involved HTML to the HTML body so you don't have to build that chunk of HTML over and over again. Please read the documentation for Templates: https://www.tiny.cloud/docs/plugins/template/
When you apply CSS in content_CSS it only affects how TinyMCE looks in the iFrame that the editor lives in. You need to get the CSS into the head of the page you are bringing over from your databse.

how do i locate files in wordpress by inspecting element a particular element in google chrome?

I want to change some particular line on my Wordpress site which I cannot change in the customization. How do I locate a certain line with inspect element in chrome?
My website is www.Artiana.io and I want to edit this line:
"<h5 class="subscribe-description">Learn more</h5>"
Please, can anyone help me out?
Let me show you how you can use WordPress's hints in html body class to find the php file:
WordPress gives hint in the HTML's body tag that which particular template was used to display this page.
In your case we have following classes in the body tag:
<body class="home page-template page-template-page-templates page-template-page_front-page page-template-page-templatespage_front-page-php page page-id-466 custom-background wp-custom-logo blog-post">
Now there is a specific class which ends with php, which tells that template was used by your theme to build this page. i.e. page-template-page-templatespage_front-page-php
Now it could mean that in your theme folder:
/wp-content/themes/hestia/
There could be sub folder or folders called: **page-template/page-templates** and inside it is page_front-page.php PHP file, which is being used to create this layout. See if you can locate the code you are trying to modify there.

Changing content in cufontext tag within a wordpress theme

I have installed a WordPress theme which features headings like 'our sponsors' or 'featured posts'. When I inspect the element using google chrome, it shows that it is within a tag called 'cufontext' which I have never come across before (i think it is to do with javascript).
Is it possible to change the content within the cufontext tag so that it says something different like 'about me' instead of 'our sponsors'?
Thanks
Cufon is a font-replacement technique that uses javascript to write fonts from a font file to your browser.
So those <cufon> tags are generated when page renders and are not in the template files.
Simply find where 'our sponsors' text is located and replace it to your likings.
The most possible location for that text is:
in post / page as a title
in the template as static text

Diazo: not style overlay windows in Plone

I am upgrading to Plone 4.2 (from 4.0.1) and moving my theme product from XDV to Diazo.
A bug has presented where when i submit a form from an overlay to a custom page template, the resulting page is 'plain'. By 'plain' I mean the only visible content is the main content area, there is no plone nav, logo, none of the style sheets are present etc. There is an 'info' message passed to this page and that does get rendered at the top of the page (nothing is styled with any plone or theme styles though). It's like the target page is rendered outside of the Plone space altogether.
I have tried adding to my rules.xml and adding the corresponding ajax_load = python: request.form.get('ajax_load') to the parameters in the theming control panel 'advanced settings' section. The overlay is still themed however, and the form target page is still 'plain' (I wont say 'unthemed' as even an unthemed Plone page still has the basic logo, nav etc).
I also tried add a and sticking an item with this id in my overlay template - the overlay still gets themed.
I am using the theme rule
Not sure why the overlays remain themed and if this is part of the problem? Also not sure why the form target page template is rendered 'plain'.
If i submit the same form normally (not from an overlay) the target page renders properly themed...
Any tips to debug this would be great thanks.
Am using Plone 4.2.0.1 and plone.app.theming 1.1a2, my theme is file system based.
Edit: OK some of my overlay forms are working properly. The difference seems to be where the form action is:
form tal:attributes="action request/URL" - works OK
form tal:attributes="action string:${context/absolute_url}/##view" - gives me the 'plain' page at first render when called from an overlay form (as discussed above is fine when called from the same form not in an overlay)
Note that the 'plain' page html goes like this (note no base Plone or Theme head inclusions):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><base href="http://localhost:8080/Plone/sectionfoo/sectionbar/mypage" /><!--[if lt IE7]></base><![endif]--></head>
<body class="template-view portaltype-myCustomType site-Plone section-sectionfoo icons-on havePortlets haveLeftPortlets haveRightPortlets" dir="ltr">
<h1 class="documentFirstHeading">Why is this page plain?</h1>
...
I also tried completely uninstalling my theme product - i still see the same behaviour from these particular overlay forms in vanilla plone...
If you're using a JavaScript .prepOverlay() call to set up the ajax overlay, then it will automatically append the ajax_load flag as part of the query string used via AJAX to get the code that's displayed in the overlay.
See http://pypi.python.org/pypi/plone.app.jquerytools/1.5#ajax for an explanation of what ajax_load does. In brief, it causes the server to strip everything but the content area off. The purpose is to avoid loading unnecessary page parts into an overlay, which is already displayed inside a page.
If the form you load is posting to itself (a very common Zope/Plone practice), then the ajax_load parameter may be in the form action URL. So, you get only the content area returned.
So, you'll need to do some work in your custom form template to make sure you strip "ajax_load" off the query string of the URL before you set the form action. Also, strip any "ajax_load" hidden input out of the form.

wordpress edit specific page html

For example I'm create new page in wordpress "page3" I want edit html and css of this page and add for example my contacs, how to do this ?
I'm searching in theme options, but no resut.
You can edit the page.php file but what you do to it will effect all other pages. Or you can duplciate the page.php file and call it page-3.php (Or whatever your "Page3" page ID number is). Be sure to keep the calls for the header and footer and the tops and bottoms of your page .

Resources