jb01
Forum Replies Created
-
Looks good, thanks very much! ??
That’s not the way srcset works. You put the smaller image size in the “src” attribute. Then the browser will decide which is the appropriate size from the srcset and load that based on the browser size and amount of space that element takes up. The browser does not load every version within the srcset. You set the rules as to which image will be used at each screen size. It can also better support high density screens (like Retina). This is why it will improve loading time while looking good in different layouts.
Here’s some sample code of you haven’t done this before – https://flaviocopes.com/html-responsive-images-srcset/
Hope this helps.
- This reply was modified 4 years ago by jb01.
Forum: Themes and Templates
In reply to: [Neve] bug report: tag links missing quotesI first discovered this issue is when a WP redirection plugin was scanning the site for 404 errors and detected this missing use of quotes as broken HTML. To be honest, there really is no good reason to avoid using quotes – if keeping the HTML code as small (and fast) as possible is the goal – the risk of it not being read by various parses, browsers, bots, etc is far too great by contrast. There is really no benefit to it – other than being stubborn. I took the time to report this issue, which most experienced web developers would notice and say “yep, you’re right, thanks” and move on. I don’t understand why you prefer to make an issue out of it. I’m sure there’s plenty of ways your time could be better spent on Neve.
Forum: Themes and Templates
In reply to: [Neve] bug report: tag links missing quotesTechnically, you can get away without wrapping attributes in quotes according to the HTML spec, but it’s generally considered bad practice and can break HTML validation depending on the doctype used. Here are 2 references:
https://html.spec.whatwg.org/multipage/syntax.html#unquoted
https://stackoverflow.com/questions/13056683/html-attribute-with-without-quotes
Just because a modern browser can make up for malformed code, doesn’t mean it’s a good idea to rely on it.As I already fixed this in my copy of the theme, so I don’t have a live version handy. I can look at your code and see where the quotation marks are missing pretty clearly.
$html .= '<a href="' . esc_url( $tag_link ) . '" title="' . esc_attr( $tag->name ) . '" class="' . esc_attr( $tag->slug ) . '" rel="tag">';
Forum: Themes and Templates
In reply to: [Neve] bug report: tag links missing quotesYou’re right, I think I copied the wrong section on the 1st time. I already overwrote that file so I dug it out of the original zip and it looks like this:
$html .= '<a href=' . esc_url( $tag_link ) . ' title="' . esc_attr( $tag->name ) . '" class=' . esc_attr( $tag->slug ) . ' rel="tag">';
Notice the “class” is missing wrapping quotation marks.
- This reply was modified 4 years, 1 month ago by jb01.
Forum: Plugins
In reply to: [XML Sitemap Generator for Google] Exclude URLI’m in the same boat, so I’ll be watching this thread for an answer.
In case it helps anyone else, I’ve written a quick plugin to convert the TABLE output to DIV. It could be more elegant, but this gets the job done.
Here’s the PHP code:
https://pastebin.com/TAmP4LxFSteps:
1) Create a folder “tablepress-divoutput” in your “plugins” folder in WordPress
2) Create a file named “tablepress-divoutput.php” and copy and paste in the above code.
3) Create a subfolder “css” and a file within that “tablepress-div.css”.Add any desired CSS code to that new file to style your output (required some CSS knowledge).
Thanks for getting back to me so quickly Tobias. I will take your advice and built a custom plugin based on one of the existing ones and use the “tablepress_table_output” hook to create a find/replace of the table tags.
If I can make a feature request for the next major version – adding in a “template” option that can be passed within the shortcode. Perhaps that template file could be an external one (such as “mytemplate.html” or “mytemplate.xml”) and that contains tokens/tags to represent the key info that is outputted.
Forum: Plugins
In reply to: [Media Library Assistant] Make "attachment metadata" field editableHi David,
I’ve tried to follow your instructions and here’s a screenshot of the mapping:
https://screencast.com/t/vmStJO1T
Does this look correct?I can’t seem to actually find those fields anywhere for viewing or editing. I’ve checked on the Media detail and MLA Assistant pages, but nothing I can see.
I’m trying to extract the following EXIF information so it can be edited:
camera,aperture,shutter_speed,iso,focal_length,exposure_bias,flash,created_timestampI’ve got a separate plugin which is responsible for displaying that EXIF data and that works fine. But I’m needing to edit the EXIF data on individual images when some of the info is missing (since the images are from various sources).
Does this help you with a better idea of what I’m trying to achieve? I appreciate your feedback and guidance.
Forum: Plugins
In reply to: [Exifography] Incorrectly read camera modelI had the same issue and it drove me nuts. I can confirm that Lightroom 6 is to blame. There’s quite a few forum threads about with users complaining about it.
I confirmed by using an image in WordPress that was edited previously with LR5 and a new one edited with LR6, and the LR6 image didn’t show up the camera make/model.
Here’s a very rough workaround: https://blog.tookapic.com/how-to-fix-corupted-exif-data-in-your-lightroom-6cc-exported-photos/
Hope this helps someone else and they can save a few grey hairs.