Posts by Caio Felipe Pereira • 4,570 points
135 posts
-
2
votes1
answer2424
viewsA: How to list all posts on a custom page? Wordpress
Got it. You want that one page, through the loop in your template, show all posts that you have registered, and not the text of the page. This is happening because you are using the loop standard,…
-
3
votes2
answers1694
viewsA: What is the ">" CSS operator for?
The operator > serves to indicate direct children. See: #panel_container > p{ font-size: 28pt; } <div id="panel_container"> <p>Oi</p> <div class="teste">…
cssanswered Caio Felipe Pereira 4,570 -
13
votes5
answers15911
viewsA: How to make a circle in CSS without Border-Radius 100%?
If SVG is an option <svg height="100" width="100"> <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" /> </svg> I know you don’t have CSS there in the…
-
0
votes3
answers57
viewsA: Problems with CSS opacity
I believe your question is unrelated to opacity, since you cite the term only in the title. I assume, too, that it is about the stylization of the text. So there goes my answer based on these…
cssanswered Caio Felipe Pereira 4,570 -
1
votes2
answers943
viewsA: Index in Wordpress Subfolder
TL;DR Remove any rule from your .htaccess that you will be able to access http://meudominio.com.br/hot-site-novo hassle-free. Why does this happen? Realize that your WP lives at the root of…
-
3
votes4
answers7832
viewsA: Redirect problem in Wordpress
As I said in the comments, this URL Wordpress is normal. When you enter wp-admin without being logged in, it sends you to the login page (wp-login) for you to enter your credentials, and return it…
-
1
votes1
answer2325
viewsA: Add only one product in Woocommerce cart or clear cart
To clear the cart before adding a new product, you can use the following filter: add_filter( 'woocommerce_add_cart_item_data', 'woo_custom_add_to_cart' ); function woo_custom_add_to_cart(…
-
0
votes1
answer267
viewsA: Sort Wordpress posts with Jquery or meta_key and meta_value
I’m not sure I understand your question, but come on: To what extent this could harm the performance of the site in its upload? In my view, the difference will be minimal. Remember that any…
-
2
votes2
answers544
viewsA: Translate Wordpress strings from Portuguese to English
The default solution in Wordpress for translations is Internationalization. You prepare your theme/plugin so that it can receive different translations. Basically, you embrace your strings text in…
-
2
votes1
answer1443
viewsA: How to create categories for a Post type in Wordpress?
You can achieve your goal by registering a custom taxonomy for your Custom Post as follows (I will assume that the post type is called product, and that taxonomy is called product type): /* Action…
-
0
votes1
answer354
viewsA: Restrict "Author" user to see only images he sends
Assuming that the user will have at all times the role "Author", you can restrict the media library using the action called pre_get_posts. For teaching purposes, actions - in a very simple way -…
-
10
votes5
answers3336
viewsA: How to mix an array in Javascript?
Curious that no one mentioned the Fisher-Yates, which is perhaps the most classic algorithm for permuting a finite set. The most interesting thing is that all possible returns of the algorithm are…
-
2
votes1
answer3926
viewsA: How to restrict access to a particular page in the wordpress Adm. panel?
How can I create a control similar to that of adminimize but only releasing one page for each user (as the example of the first image)? I advise you to use a plugin to do this. Doing it at hand will…
wordpressanswered Caio Felipe Pereira 4,570 -
1
votes2
answers44
viewsA: build a conditional using object
In the case of a true/false, you can do something like: divShowOrHide({ //valorEscolhido: valor, condicional: valor === "SIM", hideDiv: "#esconde" }); He will assign to condicional the value of the…
-
1
votes2
answers48
viewsA: There is the possibility to mount a CSS specific to a size in Bootstrap
CSS 3 lets you create selectors using substrings of attribute values. For example, if you want to style links it contains http:// in the attribute href, without going straight to the tag <a>,…
-
3
votes2
answers226
viewsA: Is there a difference between using inline CSS or Ids for a lot of different elements?
Like the Weslley Tavares mentioned, the performance turns out to be better when using CSS inline (which is to define the attribute style directly in the tag). But, unless you are using a framework…
-
2
votes1
answer168
viewsA: Why include Html5.js file
This instruction ensures that only browsers that are IE8 down (source here) upload this file .js. Shim, according to Google, it is a Washer or thin strip of material used to align Parts, make them…
-
5
votes1
answer9192
viewsA: How can I set an old version of php in Xampp on localhost?
The short answer is: don’t do this. XAMPP is built around a version of PHP to ensure that everything that comes as it works properly. The most appropriate would be to search for a "new" version of…
phpanswered Caio Felipe Pereira 4,570 -
6
votes3
answers1791
viewsA: Is there any way to convert a string to base 64 in javascript?
The method btoa() can do the Meeting for you, as well as the atob() does the Decode. The return of window.btoa('minha string') is bWluaGEgc3RyaW5n and the return of window.atob('bWluaGEgc3RyaW5n')…
-
4
votes1
answer302
viewsA: What does id="Primary" class="content-area" mean if it does not exist in the style.css file?
First, it is worth remembering that the presence of classes or Ids in tags HTML does not have as its exclusive purpose the stylization through a file .css. Behold in this fiddle that div#click does…
-
7
votes3
answers833
viewsA: With the ninth digit on the phones, how can I solve the problem of displaying 8-digit phones?
At bank level, and only for telephones in Minas, we can make the following solution: UPDATE telefone SET telefone = ( Replace (telefone, '(31)', '(31)9') ) Assuming, of course, that the camp…
-
1
votes2
answers85
viewsA: Crop image in wordpress and delete the original image
The PHP has a method called getimagesize() which, as the name says, returns the image size. For example $filepath = 'https://upload.wikimedia.org/wikipedia/en/c/c2/Peter_Griffin.png'; $size =…
-
0
votes2
answers1616
viewsA: How to customize scrollbar in div?
Your question is pretty generic, because it doesn’t have a minimum, complete and verifiable example. So, assuming you want to know which elements (in this case, pseudo-elements) you should style,…
-
1
votes2
answers489
viewsA: Delete post through meta_value Wordpress
There are several ways to do this. One of them is by comparing the meta_values, which I believe is what you’re doing. I already suggest a slightly different approach. Note that the latest version of…
wordpressanswered Caio Felipe Pereira 4,570 -
2
votes1
answer672
viewsA: How to restrict the width of an absolute div element within another div while maintaining its position?
To div with position: absolute has the absolute position always referring to div parent who has relative positioning. If no div parent has relative positioning, its positioning will be absolute in…
cssanswered Caio Felipe Pereira 4,570 -
10
votes6
answers10103
viewsA: What is a Web Service?
TL;DR: Webservices allow two (or more) machines to communicate via a network. For a deeper explanation, imagine the following scenario: Your company trades dollar products, whose value fluctuates…
-
1
votes1
answer407
viewsA: How to pass a GET request to a file that does not belong to wordpress
Assuming that you are over-writing your permalinks, you won’t be able to do that even as the file is inside the theme folder. This is because of the fact of Wordpress, when with permalinks enabled,…
-
1
votes1
answer222
viewsA: Random site theme with exchange every 30min
Well, from what I understand from the code you posted, you have 3 files .css different, and you’re trying to randomize which one of them will be uploaded and used by the page. As I suggested in the…
-
5
votes1
answer3469
viewsA: Fixed background in HTML5 CSS3
Add: background-attachment: fixed; See this example of W3C
-
3
votes1
answer137
viewsA: Performance CSS (CSSOM and selectors)
TL;DR: The selector .media__bd--gretting h1{} is faster. I say it’s faster based on a series of articles that I’m going to quote here, but it’s worth starting my answer by saying how complicated…
-
1
votes3
answers284
viewsA: Div with fixed position on the screen within the boundaries of another div
This concept is called "Scroll then fix". It’s something relatively easy to do. The always excellent css-Tricks has a nice tutorial on how to do this. This thumb drive user’s simpleminded also…
-
2
votes1
answer448
viewsA: Different sizes for images highlighted in wordpress!
Your code seems to me to be incomplete. I will base my answer on what I understood. Add Image Size This method does what its name says: adds a new image size. Any image is an image, including the…
-
0
votes1
answer112
viewsA: Pagination and Order BY
These "variations" you see are the parameters of WP Query. In the link you can see all the (many) possible combinations that can be made. Answering your questions in particular: Show articles with…
-
2
votes1
answer68
viewsA: Skip page 5 in 5 Blocks
You can increment a counter and check if it is multiple of 5 at each loop pass. $i=1; while($row = mysql_fetch_array($busca)){ echo "<div class='bloco'> <p class'nome'>FULANO</p>…
-
-1
votes3
answers436
viewsA: Problems Configuring Gradient in CSS
Using the powerful Gradient Generator .gradient{ width:500px; height:500px; /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#a0a5ff+0,2737fe+100 */…
-
2
votes1
answer1024
viewsA: Change the background of a Scroll div
Realize that there is a background image in div#bar. If you increase the height hers of 7px current for something like 100px, you can understand how the image moves. Still keep an eye on this…
-
0
votes2
answers1630
viewsA: Is there crud plugin for wordpress?
As @Lollipop mentioned, the use of wpdb can solve your problem. But, when it comes to plugins, I believe that the Contact Form DB may give you some light. I have used it together with the Contact…
-
0
votes2
answers83
viewsA: Display None helps resolve slowness on an onepage site?
In short, no. Apply a display: none afterward that the element has already been created and rendered on the screen should not drastically affect its performance. You will basically be missing…
-
1
votes1
answer376
viewsA: Align CSS tree vertically
Your code is based on absolute positions and margins relative to the layout you have now (i.e., the class label gets the 50% from the top of her div father, the class branch has margin-left: 250px,…
-
1
votes2
answers205
viewsA: Add in the product title the parent category of the registered product
Assuming that the Parent Category be the highest category in the hierarchy (i.e., she herself does not have a father), a method that seeks the highest in the hierarchy solves her problem. Something…
-
1
votes1
answer238
viewsA: CSS effects to use in images
Best article that this one don’t know. An example of the operation, taken from the article itself, is this: img { display: block; width: 90%; } img.filtro { -webkit-filter: grayscale(1); filter:…
-
3
votes2
answers679
viewsA: Menu to select color
This particular image Picker is the seems to me to be the Spectrum. With it, just make the inclusion of the files <script src='spectrum.js'></script> <link rel='stylesheet'…
-
1
votes1
answer913
viewsA: Play and Pause script in HTML5 video does not work
At @gustavox’s suggestion in the comments, and following some good practices, let’s go to the solution: NAY duplicate your IDs. Under no circumstances is this good practice. It should not be done at…
-
2
votes1
answer112
viewsA: Resize Image Wordpress Script
How about passing the dimensions by parameter? function catch_that_image($w, $h) { global $post, $posts; $first_img = ''; $new_img_tag = ""; ob_start(); ob_end_clean(); $output =…
-
0
votes1
answer66
viewsA: Execute function whenever modify, create, delete post
Are you looking for actions. With them, you can attach methods that you define to certain "events" that occur in WP. For example, if you put, in your functions.php the code add_action( 'admin_init',…
wordpressanswered Caio Felipe Pereira 4,570 -
3
votes2
answers553
viewsA: Java script menu opens and closes other Ivs
An elegant solution (in my view) can be achieved as follows: $(".btn-toggle").click(function(e){ e.preventDefault(); el = $(this).data('element'); $(el).toggle(); $(el).siblings().hide(); });…
javascriptanswered Caio Felipe Pereira 4,570 -
2
votes2
answers755
viewsA: How to display letters from removable disk drives in Delphi?
According to this discussion in the gringo OS, and following @Math’s suggestion, the code below should solve your problem: {$MINENUMSIZE 4} const IOCTL_STORAGE_QUERY_PROPERTY = $002D1400; type…
-
2
votes1
answer491
viewsA: Slide only with html and css
I think you’re looking for a gallery, and not a slider, but, anyway, here there are 10 very cool options. I already used the last one, CSS image Enlarger gallery, in a project, and it was very cool.…
-
8
votes1
answer737
viewsA: Menu css + javascript and jquery
Maybe something like this is what you’re looking for? $('.dropdown-menu li').on('click', function(){ $(this).addClass('active'); $(this).siblings().removeClass('active'); }); li.active{ color:…
-
2
votes3
answers27676
viewsA: Differences between Onkeyup, Onkeydown and Onkeypress?
According to this link: keydown Fires when the user depresses a key. It repeats while the user keeps the key depressed. keypress Fires when an actual Character is being inserted in, for instance, a…
javascriptanswered Caio Felipe Pereira 4,570