Posts by Ricardo Moraleida • 4,005 points
175 posts
-
1
votes1
answer862
viewsA: Change comma height and width with mask
You can change the mask onKeyUp, counting the characters that exist in the input: $('.virgula').mask('#####0,0', {reverse: true}); $('.virgula').on('keyup', function() { if( $(this).val().length…
-
0
votes2
answers60
viewsA: Save form attribute without name defined
<td> <form name="login" method="post" action="../removendo.php"> <input type="hidden" value="Apagar" value="ref_<?= $linha['id'] ?>" name="campo_para_apagar" /> <input…
-
3
votes2
answers300
viewsA: How to reload grid without checking if it exists JS Jquery
Edited after the comment: You can initialize grids at the beginning of the script as a global object that will gather all the grids that exist. Whenever you set a grid, create a property inside that…
-
3
votes1
answer2436
viewsA: Switch capital letters to lower case letters
One possibility is to convert the name to lower case before inserting into HTML, and then styling with text-transform: capitalize; var nome = 'PAULO FERNANDES DA SILVA';…
-
4
votes2
answers52
viewsA: How to add the <li> tags
Without jQuery: document.querySelectorAll().length gives you the answer <ul> <li>exemplo 1</li> <li>exemplo 2</li> <li>exemplo 3</li> <li>exemplo…
-
3
votes3
answers681
viewsA: Convert Stamp time to full date with php
If the timestamp is right It will happen like this: return utf8_encode( strtoupper( strftime('%A, %e de %B de %Y postado às %H:%M', $var_DateTime->sec) ));…
-
1
votes2
answers74
viewsA: Mysql query generating error when using the OR clause
$form_data is worth null because your call to wpdb->prepare() has two placeholders (%s) and only one value ($like). Then it gives error when forming the string and the query to the bank never…
-
1
votes1
answer163
viewsA: error in cloning bitbucket repository by ssh
This is a generic error that says the key that was used to connect was not recognized by the external server. Usually it means that you made some mistake when setting up your public key there in…
-
3
votes3
answers2413
viewsA: Allow login by email, CPF or CNPJ Woocommerce
I don’t know exactly how this plugin stores the data, but the code to make the login work with them will be something like this. add_filter( 'authenticate', 'ptstackoverflow_auth_com_cpf_ou_cpnj',…
-
1
votes1
answer248
viewsA: Search in WP, "%" does not work
I don’t think the problem is %, but the way you’re using $wpdb->prepare(): $like = '%' . $wpdb->esc_like($this->table_search) . '%'; $form_data = $wpdb->get_results( $wpdb->prepare(…
wordpressanswered Ricardo Moraleida 4,005 -
2
votes1
answer62
viewsA: Multiple wp_query without repeating category
What you want is impossible using a query only. The best way to do it will depend on your real situation, for example, can they always be in the same order? Type 1 car, 1 outfit, 1 song, etc? A…
wordpressanswered Ricardo Moraleida 4,005 -
2
votes2
answers431
viewsA: Increment when calling javascript function
You are resetting the counter every time you call the function, because it is opening var count inside. Define count before, as in the example, so that the same variable is available whenever it is…
javascriptanswered Ricardo Moraleida 4,005 -
1
votes1
answer824
viewsA: Image size highlighted in wordpress
get_the_post_thumbnail() accepts size as second parameter. The first is post_id get_the_post_thumbnail_url( $post->ID, 'post-thumbnail') must solve Addendum: Both post id and size are optional,…
wordpressanswered Ricardo Moraleida 4,005 -
2
votes4
answers345
viewsA: How to select an option with value comparison?
The most common in these cases is to assign a specific ID or class for each term, which you can reference directly in the answer, type $('#uf'+estado). If not possible you can select the correct…
-
2
votes2
answers70
viewsA: How to remove registered custom post types from custom Fields list?
Without seeing the code that creates the meta-boxes we just have to kick. Probably somewhere in your code there’s a call to add_meta_box() where the fourth parameter - $screen - is empty, false or…
wordpressanswered Ricardo Moraleida 4,005 -
5
votes1
answer754
viewsA: Wordpress use ajax on page template
The specific problem The global variable js_global is not defined in the page. It seems to me that you are loading the template without using the query ?js_global=1 then the checking in…
-
1
votes2
answers95
viewsA: Turn a JSON string into a non-associative array in PHP
Try this: $resultado = array_values( json_decode( $palavra, true ) ); The second parameter of json_decode() define whether it returns as object (false) or associative array (true). Once with an…
-
0
votes1
answer37
viewsA: How to activate a link editor for a created post type?
I imagine you’re talking about the permalink editor like this? If yes, it depends on the "title" option being present in the array supports when you create the Post Type: ex.: <?php $args =…
wordpressanswered Ricardo Moraleida 4,005 -
1
votes1
answer55
viewsA: Hook for Custom Rop in Wordpress
I see two possibilities, one is the filter wp_get_attachment_image_src and the other wp_get_attachment_image_attributes. The first is applied as soon as the image references are searched in the…
wordpressanswered Ricardo Moraleida 4,005 -
1
votes1
answer888
viewsA: How to apply the_content filter in get_the_content Wordpress function?
In your controller you can apply the filter the_content as soon as it searches the contents, for example: <?php require_once __DIR__ . '/../security.php'; class Controller_Single { public…
-
2
votes1
answer757
viewsQ: Modelfactory is not generating $Faker data for some tables
I’m using the ModelFactory standard of Laravel 5 some time ago, and everything was going ok, but from a few days to here stopped generating data from the library faker for some tables, although…
-
4
votes1
answer395
viewsA: Using Wordpress to leave site manageable
No need to put any framework over Wordpress, you can use its own structure to add content to any layout. You can do this in many ways: developing its own theme creating a Child Theme from an…
wordpressanswered Ricardo Moraleida 4,005 -
1
votes2
answers2175
viewsA: CRUD plugin for Wordpress
It is not an interface, but only pointing here that it is not necessary any plugin to make generic Cruds within Wordpress. The system uses a global class called $wpdb that already brings with it an…
-
3
votes2
answers4031
viewsA: How to change the /wp-admin/ Wordpress directory? and how to change the Wordpress admin Urls?
It is not the best way to answer, but as you asked for a plugin, the Better Wp Security does it. Be sure to read the instructions carefully, otherwise it will lock you out of the site. you were…
wordpressanswered Ricardo Moraleida 4,005 -
-1
votes3
answers162
viewsA: Use . on() instead of . bind() in Cakephp’s Jshelper
The method on() is the evolution of bind(), can change without fear. of documentation: As of jQuery 1.7, the . on() method is the Preferred method for Attaching Event handlers to a Document. For…