how to setup custom content structures
how to setup custom content structures
how to setup custom content structures
Here’s one idea: /** * Reactivate the sticky theme, if someone activates another theme. */ add_action( ‘switch_theme’, ‘wpse_permanent_theme’ ); function wpse_permanent_theme( $new_name ) { $sticky_theme_name=”twentyfifteen”; // Modify this to your needs! // Get the sticky theme info, to check if it exists (named): $sticky_theme = wp_get_theme( $sticky_theme_name ); // Reactivate the sticky theme: if( $sticky_theme->get( … Read more
// First, get associated taxonomies of the post/object. $object_taxonomies = get_object_taxonomies( get_post() ); // Next, get associated terms of the post/object. $object_terms = wp_get_object_terms( get_the_ID(), $object_taxonomies ); $terms = array(); // returned object terms could be WP_Error, so check that first. if( ! is_wp_error($object_terms) && is_array($object_terms) ) { foreach( $object_terms as $object_term ) { // … Read more
How to make search for posts using get method?
Issue with loading mobile specific custom single page layout in mobile
I’m not familiar with the Cherry Framework but a quick search looks like the theme options allow for “Custom CSS” right under the General tab. To quote: Custom CSS – if you need to add some CSS rules, but you don’t want to mess with the main CSS file, you can use this field. Just … Read more
Pull request in WordPress repository?
About the link you provided The black bar is part of the .pagewrapper but there is no width specified for pagewrapper. .pagewrapper { left: 0; position: relative; transition: left 500ms ease-in-out 0s; } The post content is set a max-width: 700px, it will not extend the boundary. .wrapper { margin: 0 auto; max-width: 700px; width: … Read more
As per comments of @TomJNowell you can include images as files with your theme, but you shouldn’t automatically insert them as attachments in the database and neither should you generate pages on theme activation. The user might be just checking out your theme and end up with stuff in his database het doesn’t want. What … Read more
One of the solutions that I’ve found, is to store the set get_theme_mod($name) into a PHP $_SESSION[“$name”]. If the session exist, compare the new get_theme_mod($name) to that old $_SESSION[“$name”], if they’re not the same then // do something..: // Check if the user is an admin for validation to improve performance. if (current_user_can( ‘manage_options’ )) … Read more