Posts by Glaydson Rodrigues • 186 points
13 posts
-
1
votes1
answer48
viewsA: Wordpress error in Jquery no admin-ajax.php [500]
From the description, this happened when you changed the project to localhost, AJAX is sending the request to the old site, you need to change ajax action url and point to the new route. I recommend…
-
0
votes1
answer32
viewsA: menu conflicts in wordpress
Try to call it that: <?php wp_nav_menu( array( 'theme_location' => 'menu_principal' ) ); ?> // para menu topo <?php wp_nav_menu( array( 'theme_location' => 'rodape' ) ); ?> // para…
-
0
votes1
answer20
viewsA: is_home does not work inside wp_enqueue_scripts
Probably not working because you have set a main page in the wordpress settings, instead of the is_home(), place: is_front_page()
-
2
votes1
answer103
viewsA: Wordpress - How to get thumbnail in an HTML tag with CSS and PHP?
To get the thumbnail url just use the function: get_the_post_thumbnail_url() recommend putting it inline in html, example: if ( has_post_thumbnail() ) { $img = get_the_post_thumbnail_url(); } else {…
-
0
votes1
answer101
viewsA: Wordpress invalid taxonomy
To get the taxynomy posts need to pass this way: <?php $terms = get_terms( array( 'taxonomy' => 'tax_projetos', 'hide_empty' => false ) ); ?> <?php foreach( $terms as $_terms ): $args…
-
1
votes1
answer103
viewsA: Limit amounts of categories in wordpress
Use the array_slice to extract a portion of an array, in the following example, you will go through the array at position 0 until you reach position 5 foreach( array_slice($prod_marca, 0, 5) as…
-
0
votes1
answer217
viewsA: Link with error when sharing on Facebook and Whatsapp - Site in Wordpress
Disable the plugin, under the title tag add this: <meta property="og:title" content="...titulo do site..." /> <meta property="og:type" content="website" /> <meta property="og:url"…
-
1
votes1
answer25
viewsA: Wordpres pick up the modified post
You can pick up posts by modified date, e.g.: $args = array( 'post_type' => 'post', 'post_status' => 'inherit', 'orderby' => 'modified', 'order' => 'DESC', 'posts_per_page' => -1, );…
-
1
votes1
answer31
viewsA: wordpress study
Calls a style page to the theme First parameter ($handle): Adds a name to the stylesheet. Obs: If you need to make two file calls .css, you must add two different names, one for each sheet. Second…
-
0
votes1
answer25
viewsA: error in wordpress query
1- To list wordpress posts, you need to put the value of 'post_type' as 'post', this way that you did: 'post_type' => 'page', is trying to query the pages created. 2- numberposts is used to query…
-
0
votes1
answer207
viewsA: Page Template does not appear - Wordpress
You need an index.php file in the theme to work this function, even if the index file is empty
-
0
votes2
answers132
viewsA: Recommendation of cache plugin for wordpress Multisite
WP Super Cache is a great cache plugin, with over 2 million active installations, it proves to be the most efficient cache plugin. And is maintained by Automattic itself. Just activate it on the…
-
2
votes1
answer41
viewsA: Wordpress: multiple queries
You can use the function: array_merge() to join the found results, for example: $args1 = array( 'category' => 'my-category', 'posts_per_page' => 5 'key' => 'my-value1', 'value' =>…