Posts by Daniel Lemes • 386 points
21 posts
-
0
votes1
answer18
viewsQ: SQL: How to copy the value of a meta_key into an array in another meta_key?
Asking here because it seems more a matter of SQL than Wordpress. I have a Wordpress installation that uses custom fields from both the ACF plugin and the template. There are over a thousand posts…
-
0
votes1
answer25
viewsA: Envato API Curl response error, malformed token
Okay, I found the answer: CURLOPT_HTTPHEADER instead of CURLOPT_HEADER. The final and working code: if (extension_loaded('curl') === true) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url);…
-
0
votes1
answer33
viewsA: Paragraph within flex-item overflowing
If I understand correctly, you can try using line-break: Anywhere or word-break: break-all in the article (if you’re talking about the missing breakage of all linked text in the paragraph.…
-
0
votes1
answer25
viewsQ: Envato API Curl response error, malformed token
I’m trying to get data from Themeforest templates using the API of Envato; need data as template name and price from product ID. But the answer via Curl is that there is an error in the formation. I…
-
1
votes1
answer38
viewsQ: Redirect 301 only in case of direct access to the file
I have a . zip file in a folder on my server and I don’t want direct external links to it, only through a link on my own site. So I created a . htaccess in the file folder and put: RewriteEngine on…
-
1
votes1
answer45
viewsA: PHP - function in Wordpress plugin itself causing error 500
Just give a value to each var at the beginning of the function. Instead of: function give_linked_media( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ) Became: function…
-
1
votes1
answer45
viewsQ: PHP - function in Wordpress plugin itself causing error 500
I developed a plugin for inserting shortcodes in Wordpress. It was my first, for personal use, has been working for years. But a few weeks ago, it started to cause error 500 (POST…
-
5
votes2
answers103
viewsA: How do I represent this using CSS?
My example with z-index. EDIT: by the way, my trip, nor need the z-index because it is div inside div, not two overlapping. But it works the same way. #main {border: 2px solid darkgrey; width:…
-
2
votes3
answers428
viewsA: CSS right in the HTML tag
I’d say the ideal is to avoid it when possible. Such "good practice" is like other tools: we do not use the hammer to cut or the pliers to hit nail. For this we have the style sheet, keeping the…
-
1
votes2
answers1776
viewsA: How to approve author posts in Wordpress?
On one of my websites, I use a function that creates a personalized role. You can put the "writers" on it and so they will have the permissions you determine. In the functions: // Cria cargo…
wordpressanswered Daniel Lemes 386 -
2
votes2
answers137
viewsA: Wordpress - How to include new fields in the user table?
It should do. Just change the code, switching social networks for your need http://www.escolawp.com/2011/12/como-adicionar-mais-campos-no-perfil-de-usuarios-do-wordpress/ Na functions.php: <?php…
-
0
votes3
answers463
viewsA: How to organize quotation marks of HTML and PHP content inside echo?
If I understood correctly, that would be it? if ($row_usuario['id_relacionado'] != 0) { echo " <div id='id_resultado'><a href='visualizar.php?id=". $row_usuario['id_relacionado'] ."'>".…
-
1
votes0
answers93
viewsQ: Translate . rc in Visual Studio directly in Source?
I’m trying to translate a project with Visual Studio 2013 (Snes9x emulator). I have no experience with the theme, but following the instructions of the package, I understood the resources and…
-
3
votes1
answer271
viewsA: Effect of random words
Forming new text, that is to say? Maybe you’re talking about this. It is a jQuery plugin that transitions between sentences, just put height in the element that contains the text: var list =…
-
0
votes1
answer58
viewsA: jquery src returning "Undefined" in Wordpress
I discovered by researching the OS in English (here). Instead of using: imgurl = $( 'img', html ).attr( 'src' ); ...just use imgurl = $( html ).attr( 'src' ); Strange is that the first way works on…
-
0
votes1
answer58
viewsQ: jquery src returning "Undefined" in Wordpress
I have a function to create extra fields in the profile editor of users of a site in Wordpress. A part of it creates two image upload fields (media Uploader with thickbox), and a snippet in jQuery…
-
1
votes1
answer100
viewsQ: SQL only in custom Wordpress post for tag conversion
Let’s say a site using Wordpress has half the posts of the default type, and the other half using a Custom Post Type "review" http://codex.wordpress.org/pt-br:Tipos_de_Posts_Personalizados. But this…
-
0
votes0
answers153
viewsQ: How to open the Wordpress media library by tinymce?
I’m trying to create a shortcode to embed audio files on the page, and I prefer not to use the standard Wordpress shortcode because I need other parameters. I use a basic script to open a tinymce…
-
1
votes1
answer198
viewsA: How to disable checkbox in tinymce based on listbox value
I got help on Wordpress.StackExchange. A solution to "hit" the target (the checkbox and its label) is to create a var with the window and then bring it with the function onselect menu. So was the…
-
3
votes1
answer285
viewsA: How to use wp_enqueu_style?
Have you tried is_page_template? Something like: if ( is_page_template( 'contato.php' ) ) { wp_enqueue_style('terra-style', get_stylesheet_uri() . '/contato.css' ); } Reference…
wordpressanswered Daniel Lemes 386 -
2
votes1
answer198
viewsQ: How to disable checkbox in tinymce based on listbox value
I created a popup in the tinymce for Wordpress, for inserting shortcodes video on the page. When opening the window, it shows a listbox menu with various video source options (sites like Youtube,…