Disable Top Nav Bar on Mobile
If you want to get rid of the whole blue section at the top (menu and a search input field), you should add this to your CSS: .menu-search { display: none; }
If you want to get rid of the whole blue section at the top (menu and a search input field), you should add this to your CSS: .menu-search { display: none; }
It’s possible that the developer hard-coded the menu items in the theme. Check out the Appearance, Customize screen to see if there is a Menu choice in there somewhere. It may also be that the active theme (assume it was by the developer) doesn’t support Menus. That would be a warning sign to me that … Read more
By default wp_nav_menu() outputs the navigation markup. If you want to store it or want to concatenate it with other string then you’d have to set the echo parameter to false (by default it’s true). $output .= ‘<ul class=”sub-menu”> ‘ . wp_nav_menu( array( ‘theme_location’ => ‘col_1’, ‘menu_id’ => ‘col_1’, ‘menu_class’ => ‘col_1’, ‘container’ => ”, … Read more
You can use the combination of in_same_term and excluded_terms. First of all, you have the ID of the category you want to display post from. Next, get all the id of the category of the post by using wp_get_post_terms You can iterate through the returned terms and build an array of terms that you want … Read more
Given a category ID, in this example as the variable $cat_id, you would do this by querying 1 post in that category, ordered by date in ascending order (oldest first). Then use that result to get the permalink to that post. $posts = get_posts( ‘numberposts’ => 1, ‘order’ => ‘ASC’, ‘cat’ => $cat_id, ); if … Read more
Configure WordPress to listen on a port other than 80
This is the wrong place as this is not a wordpress-related question (well, or the answer isn’t wordpress related), but here is what you do: Get all your files through HTTPS (especially extern files) or just download the extern files and host them on your webspace/server/cloudd. This isn’t only more efficient and resistant to unexpected … Read more
This is an extremely unreliable way to determine the next and previous category IDs: $previouscat = $id – 1; $nextcat = $id + 1; There’s absolutely zero guarantee that the IDs of adjacent categories are only 1 apart. In fact the only time that would be the case is if all the categories were added … Read more
wordpress page navigation numeric pagination showing same posts on each navigation
Check the signature of the function: next_post_link( string $format=”%link »”, string $link = ‘%title’, bool $in_same_term = false, array|string $excluded_terms=””, string $taxonomy = ‘category’ ); Excluded terms should be the fourth argument. Your code is passing a “true-ish” argument to $in_same_term.