Is there a way to switch to another theme?

switch_theme() is the function you need but this… why is someone changing the stylesheet and no longer changing the theme? … indicates a misunderstanding. You provide the $stylesheet as an argument but you are switching the theme as a whole not just the stylesheet. And, for reasons unknown, $stylesheet isn’t the stylesheet. It is: $stylesheet … Read more

Full width featured thumbnail

The easiest way would be to do away with the content.php file for this template and move everything to your single-thumbnail-featured.php so you don’t mess up any other pages using content.php. Then I would simply move the_post_thumbnail() outside the col-md-8 into a full width col-md-12. single-thumbnail-featured.php //Loads the header in which there is a container … Read more

Search only working on front page (index) , not working on other pages

Currently your form looks like: <form id=”search-query”> <p class=”in-english”><a href=”http://localhost/hermodswp/?page_id=76″>Information in English</a></p> <div class=”search-box”> <div> <label class=”screen-reader-text” for=”s”></label> <input type=”text” value=”sdf” name=”s” id=”s” style=”width: 293px;”> <input type=”submit” id=”searchsubmit” value=”Sök”> </div> </div> </form> Try adjusting your submit action to point to your home_url(). action=”<?php echo home_url(); ?>” You can edit the page in Chrome to see … Read more

Fastest way to update a theme

git is probably by far the fastest and easiest way to update anything assuming you use git for development. The alternative you hinted to in the question is to use the wordpress update API, but for this you will need to set up an update server. There is some code for that here https://github.com/YahnisElsts/wp-update-server. It … Read more