A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

New answers tagged

0

I add an answer for those who like me pass here and not found a solution. Do not write: 'support' => array('title', 'author'), Instead do not forget the s: 'supports' => array('title', 'author'),


0

@Antti Koskinen Sorry I missexplained, this is not coming from Elementor, it is just that I do not know where to put the code :) I have modified the file class-wp-widget-search.php but it did not have any effect. I just added this to the file : 'selected' => 2, Here is complete file code : /** * Sets up a new Search widget instance. * * @since 2.8....


0

It's possible to create sites that look like that in WordPress. Probably the easiest way would be to just go in the gutenberg editor, and add a new block, go to the advanced section, and add your own CSS class per section you want to specifically target: You could use block plugins to do things like set background images, color overlays, and basic design/...


0

To set the default value for the category dropdown, you need to pass it as a parameter for the function. Like so, $dropdown_args = array( 'selected' => 2, ); wp_dropdown_categories( $dropdown_args );


0

Regarding question #1: It's difficult to answer because WordPress is flexible so there are different ways to do things (I know this is vague) and it depends on what your skills are (are you more skilled at React and JS or PHP? ), how much time you are willing to spend learning, and other circumstances, and like freedom for whom (the developer or the end ...


0

You are limited to what you can do with NodeJS using the REST API. As @kero explained you can't use functions like add_filter/add_action.


6

No. You can create your custom Node backend that communicates with WordPress via REST or GraphQL, but if you want to use WordPress' functionality (such as add_filter, etc.), you need to use PHP. See this as an opportunity to learn a new programming language.


0

Andy, it did not work, but I think it is because it is not matching to out template's ending, after the setup_postdata( $post ); ... We have this padding: <div> <h3 style="padding-bottom:6px;"> <a href="<?php echo esc_url(get_permalink($post->ID)); ?>"><?php the_title(); ?></a> </h3></div> ...


0

Something like this should work. I've added some explanation to the code in comments: <div class="title text-center"> <h1><strong><?php the_title(); ?></strong></h1> <img src="<?php echo get_template_directory_uri(); ?>/images/title.png" title="title-line" alt="title-line"> </div> <div id=...


0

For players you could create a custom post type, like so function my_player_cpt() { $labels = array( 'name' => _x( 'Players', 'Post type general name', 'textdomain' ), 'singular_name' => _x( 'Player', 'Post type singular name', 'textdomain' ), ); $args = array( 'labels' => $labels, '...


0

I think you have to use this after registration for autologin. if ($userid) { $creds = array( 'user_login' => $data['email'], 'user_password' => $data['pssword'], 'remember' => true ); $user = wp_signon( $creds, false ); }


0

for some reason the edit.php does not work at my setup 5.3 This however works remove_submenu_page( 'edit-tags.php?taxonomy=category', 'edit-tags.php?taxonomy=post_tag' ); remove_submenu_page( 'edit-tags.php?taxonomy=category', 'edit-tags.php?taxonomy=category' );


0

Copied from comments, so the question will indicate an answer has been provided: Found your key symptom. Inspecting your Impressum page with Chrome indicates loads of 404 errors. For example: http://darius-mann.com/smardigo/impressum/costum/hexagon/hexagon.js not found. If I remove the "impressum/" the file opens correctly. However your theme is building ...


0

You can except to go to that logout page. Only you need to change your logout link in your frontend. <a href="<?php echo wp_logout_url()?>">logout</a> this code, make the logout without confirmation window. But also if you really need a confirmation, you can create a "new page" named "confirmation" now, in your frontend the logout can ...


0

If you need to pass username and password for Basic Auth you need to send that in headers e.g. $headers = array('Authorization' => 'Basic ' . base64_encode( YOUR_USERNAME . ':' . YOUR_PASSWORD ); $response = wp_remote_post( $url, array( 'method' => 'POST', 'timeout' => 45, 'headers' => $headers ) ); If you need to ...


1

Take a look at wp_upload_dir here https://developer.wordpress.org/reference/functions/wp_upload_dir/ $upload_dir = wp_upload_dir(); var_dump( $upload_dir ); /* $upload_dir will comprise of the following return values: 'path' - (string) Base directory and subdirectory or full path to upload directory. 'url' - (string) Base URL and subdirectory or ...


0

Your PHP generates this html for gallery grid item: <div class="sh-image-gallery-item"> <div class="sh-gallery-item"> <div class="post-meta-thumb"> <img src="https://www.coleopterafarm.cz/wp-content/uploads/2019/12/PICT9418-660x660.jpg" alt="Carabus (Coptolabrus) smaragdinus brannicki"> <a class="sh-overlay-...


0

Now I finded this in plugins.js title:null I tried to change that to title:'_wp_attachment_image_alt' but it just showed text "_wp_attachment_image_alt"


0

OK, problem was in WP jquery noConflict. Basically it must work if you replace first $ with jQuery, but in this case needed to replace second $ too. So, answer is to change second $ by jQuery. <textarea class="emojitextarea"></textarea> <script type="text/javascript"> jQuery(document).ready(function() { jQuery(".emojitextarea")....


Top 50 recent answers are included