I want to use HTML5 in my WordPress theme, how do I turn off wptexturize? I don't mind WP adding breaks, but I want them to be <br> and not <br />. How do I get control over how those breaks show up in my code? EDIT: I only really care about the <br> tag issue, I don't mind the typographic changes it makes. EDIT2: Actually, I guess <img> tags matter too. Any self-closing standalone tags will matter here. So, …
<?php wp_nav_menu(array( 'theme_location' => 'primary', 'container' => 'ul', 'menu_class'=> 'top-menu' /* 'walker' => new Walker_nav_Primary() */ ) ); ?> This is a simple wp_nav_menu You can see ascending order from above example I have done this in WP. wp_nav_menu gives me ascending order menu. How can I arrange as dashboard? Please help.
Starting with version 5 the HTML standard allows <a> tags wrap block-level elements. On a specific page I need to wrap a heading and an image with an <a> tag: Some intro text. <div> <a href="http://somewhere/"> <h4>Some heading</h4> <img src="http://somewhere/some-img.jpg" alt="Some image" /> </a> </div> While I can enter this in the text editor it causes some strange behavior: The code above will be transformed into this HTML code: <p>Some intro text.</p> <div> <a href="http://somewhere/"></p> <h4>Some heading</h4> <p><img src="http://somewhere/some-img.jpg" alt="Some …
This is pretty much an exact duplicate of: How to make Wordpress and TinyMCE accept <a> tags wrapping block-level elements as allowed in HTML5? and HTML5, WordPress and Tiny MCE issue - wrapping anchor tag around div results in funky output My problem is that the suggested solution (tiny_mce_before_init filter) doesn't seem to solve my problem. I have HTML that looks like this: <a href="#"> <img src="path/to/file.jpg" /> <p>Some amazing descriptive text</p> </a> The is perfectly legal in HTML5. However, …
I'm working on affiliate WordPress website, I need help on how to create login validation, like email, password and confirm password. pugins or code to do this will be appreciate. thanks
I am creating a theme and I need some idea to create a below structure on my all the page except on the home page. I know how to create a menu, sidebar, footer, and call dynamically on the page. My issue is, In which file do I have to edit it in my theme so that it will not affect on the home page.
Here is my shortcode: [contact-form-7 id="1735" title="Contact form 1"] To execute it, I need it in links (Ex.http://html.com). How to convert this short code to link? Is it possible?
Imagine that I have an HTML file as one of my WordPress blog pages (let's call it page B). I want to write an if condition inside a tag on page B to check if a specific element exists on another web page (page A). My question is what function should I choose to check this condition? Should I also import the HTML file of page A inside page B? And what should I do on the server-side, if I …
lock at the pic dont show the background-image. i try this but not working.... background-image: url("/assets/Logo.png"); how can i fix this prblm. plz give me the solution. Thx.
I want to open camera and save the picture taken. I don't want to upload saved picture. This can be done using the HTML5 - attribute: How can I add this capture attribute to my input tag in Contact Form 7 ?
I would like to use the original (non-html5) version of the [caption] shortcode. That is, I would like to edit the output so that figure and figcaption are not used as they are causing problems. How can I do this?
what is the difference between using: HTML 5 <input type="mail"> (it validate user email input without any JavaScript or any other code. 2.PHP filter_var($email, FILTER_SANITIZE_EMAIL); WordPress sanitize_email: $email=sanitize_email(' [email protected]);
I am developing my custom theme and trying to figure out how to modify the default code for WordPress image inserted into the post content, so I could add support for webP format and have it within <picture> element. I generate .webp images using cwebp library on my server and PHP exec() while image upload to the Media in WordPress Admin. The code is: function my_image_webp($meta, $id){ if(!isset($meta['sizes'])) { return $meta['full']; } $upload_path = wp_upload_dir(); $path = $upload_path['basedir']; // media …
In order to use HTML5 markup for the comment forms, I add the following code snippet to functions.php: add_theme_support( 'html5', array( 'comment-form' ) ); However, it disables client side validation on form submit and I get redirected to an error page: Now, if I remove add_theme_support( 'html5', array( 'comment-form' ) ); and submit the comment form, I get client side validation: Can anybody explain why this is? Is it a bug? Or expected behavior? I am currently using WordPress 4.7.
I cannot find a way to generate srcset for images added inside Wysiwyg Editor field of Advanced Custom Field (ACF) plugin. Obviously, i know how to generate WordPress image srcset using: wp_get_attachment_image_srcset($attachment_id); function, as described at WordPress codex: https://developer.wordpress.org/reference/functions/wp_get_attachment_image_srcset/ But my real problem is to figure out most efficient way to get image srcset for images added inside ACF Wysiwyg Editor as the way my website is structured there is too much content inside my Wysiwyg Editor like text, images, …
I just wanted to use the details/summary tag on my webpage. Using the summary tag, I'm able to define what my caption looks like. BUT, as soon as I want to edit the page in the visual editor, wordpress removes the summary tag and the standard 'Details' is shown. Is that a bug, or am I doing anything wrong?
The W3C Validator outputs an error because Wordpress adds frameborder="0" to iframes. Also the Validator does not like the allow attribute. I found a similar question for Vimeo Videos: WordPress oEmbed W3C Validation. However, I couldn't get it to work. That's the code I added to the function.php file which however does not work: add_filter( 'oembed_dataparse', function( $return, $data, $url ) { if( is_object( $data ) ) { // Remove the unwanted attributes: $return = str_ireplace( array( 'frameborder="0"' ), '', …
I'm trying to add the <aside> tag to the WYSIWYG, just like you can add a blockquote. (Basically have a button to wrap the element in an <aside> tag) I can't seem to find out how to add it by programming means, and things like the plugin Advanced TinyMCE doesn't seem to contain the option. So how can I add a custom tag to the WYSIWYG?
I have converted my PHP dynamic website into WordPress. Whole design is perfect. But unfortunately, when I click on any href link. it just changes in URL but not displaying the related linked page. Following images clarify more good: When Clicking on link addDegree.php From sidebar nav: <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Degree Pages"> <a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#collapseDegreePages" data-parent="#exampleAccordion"> <i class="fa fa-graduation-cap" style="color:gray;"></i> <span class="nav-link-text">Degree Management</span> </a> <ul class="sidenav-second-level collapse" id="collapseDegreePages"> <li> <a href="addDegree.php">Add New Degree</a> </li> <li> <a …
I try to made a website in full ajax (a html5 website). I use jquery and innerShiv (for ie). For exemple I want to load all the content of the "section" tag of a page. When I use that script, it works perfectly : var link = 'http://ajax.wuiwui.net'; $('#new').load(link + ' #contenu'); But when i use this one, I can't find element which aren't into the wordpress loop... $.ajax({ url: link, processData: false, success: function(data){ data = innerShiv(data,false); var truc …