custom js script is not loading
custom js script is not loading
custom js script is not loading
Required for what? Building a template? No if the template you choose is exactly what you want. Yes if it isn’t.
You can css ul li:nth-child(n+3) { display: none; } It’ll not show 3rd and up.
To try new theme over live wordpress site you need to duplicate the site in staging. There are many ways to do that: Manually: create a sub-domain (ex: staging.domain.com) copy files and DB there and do your changes there after tested well migrate them to live. Using plugin: A plugin named WP-Staging may help you … Read more
By default WordPress only loads translations according to the user’s language when they’re viewing admin pages. You can see that in the code for the load_theme_textdomain function: $locale = apply_filters( ‘theme_locale’, is_admin() ? get_user_locale() : get_locale(), // ^^^^^^^^ $domain ); So your code is fine if you want to override that behaviour for the front … Read more
It’s a little bit of guessing, but… I’m pretty sure it’s just a CSS problem. The real order of your menu items is P1, P2, P3, and so on. And thus this is the order on mobile devices. On desktop, the order is changed, because there is float: right assigned to menu items, so they … Read more
Different WP Rest API custom endpoints across different themes
You could try something like this: <?php $args = array( ‘category’ => 12, ‘post_type’ => ‘post’ ); $postslist = get_posts( $args ); foreach ($postslist as $post) : setup_postdata($post); ?> <h2><a href=”https://wordpress.stackexchange.com/questions/318848/<?php the_permalink(); ?>”><?php the_title(); ?></a></h2> <h4><?php the_author();?></h4> <?php the_excerpt(); echo get_avatar(get_the_author_meta()); endforeach; ?> In the example the category id is set to 12 – just … Read more
You need to learn about the WP concept of Templates and Themes. Themes are how pages are “built” and styled, and take content from the WP database as the page is Templates are part of Themes, and describe how a page specific page is built. The database is where all content is stored, including Media … Read more
You’re almost there… If you send the request to admin-post.php, then only your callback will print the response. And since your callback doesn’t print anything, then you’re getting blank screen. Most of the time what you want to do is to perform a redirect inside such callback: public function kh_update_media_seo() { delete_option(‘myoption’); wp_redirect( admin_url(‘admin.php?page=mycustomoptionspage’) ); … Read more