How to use same page template if post status other than ‘publish’?
How to use same page template if post status other than ‘publish’?
How to use same page template if post status other than ‘publish’?
You will need a simple check inside your loop which logic is quite also simple. The logic behind this is as follow: If a post belongs to the current queried category (AKA the parent category), it will have this category attached to it If a post belongs to only a child category of the current … Read more
If you are clicking the “submit” button in your form (which I am assuming); it will submit the form performing the default method GET where no method is specified. You need to ensure that you prevent the default submit action. In your JavaScript; you are listening for a change event on the entire form, instead … Read more
You cannot have a rewrite slug of “https://wordpress.stackexchange.com/”. Note that using a slug of ”, which you will find floating around, will not work for the latest WordPress versions either. If you want a url like http://domain.com/custom-post, there are no bullet-proof solutions, but the answer to this question will give you some leads: Remove slug … Read more
Unable to display pagination links on custom category template
If I read your question well, you already use WordPress Custom Logo, but you want a different logo on your front page. This means you will need to upload a separate image. Assuming you already know how to use the customizer in general you will need to build an upload field like this: $wp_customize->add_control( new … Read more
If you need this menu on one page only, let’s say About Us (slug: about-us), you can easily add a conditional like this in pages.php at the place where you want the menu to appear: if (is_page(‘about-us’)) { wp_nav_menu( array( ‘theme_location’ => ‘secondary-menu’, ‘menu_class’ => ‘secondary’, ‘fallback_cb’ => ” )); } Remember that if you … Read more
Go to settings->permalinks and chose the permalink structure you want. After that, update the .htaccess file with the content provided at the bottom of the page.
I think I got it working. Took this from the Sage starter theme from the people over at Roots. /** * Here’s what’s happening with these hooks: * 1. WordPress detects theme in themes/sage * 2. When we activate, we tell WordPress that the theme is actually in themes/sage/templates * 3. When we call get_template_directory() … Read more
if page is parent page redirect to first child with hook / polylang