pages won’t show on front page using loop or pre_get_posts
I fixed part of my issue by setting the “posts_per_page” => -1
I fixed part of my issue by setting the “posts_per_page” => -1
The primary stylesheet for a theme is usually /wp-content/themes/themename/style.css. That would be the first place to look. That file has to exist, but may be mostly empty and other stylesheets can be loaded by both theme and plugin. Some themes have very complicated stylesheet structures. The easiest way to find the stylesheets is with a … Read more
You don’t need to force the permalink structure to do this. These effects are usually handled by adding some class (with a specific style) to the item you want to highlight, in this case the <li> containing the link to the shop. In your site, the Shop menu entry (when in the Shop page) is: … Read more
I’m not entirely certain what you’re asking. If you want to have the list of pages in an ordered list insted of unordered it should be simple: echo ‘<ol>’; wp_list_pages( array( ‘title_li’ => null ) ); echo ‘</ol>’; However if what you’re asking is to order it according to some parameter so that you can … Read more
the_content does echo the content. That is stated in the Codex– “Displays the contents of the current post”, emphasis mine. Use get_the_content instead, to return a string that you can manipulate. Be aware that get_the_content does not run all of the same filter as the_content. Again from the Codex: If you use plugins that filter … Read more
For a hierarchical post type, you can use $post->post_parent and get_permalink(), perhaps like so: <?php global $post; $parent_permalink = get_permalink( $post->post_parent ); ?> <a href=”https://wordpress.stackexchange.com/questions/99483/<?php echo $parent_permalink; ?>”>Parent Post</a>
Add the data to your pages as Custom Fields, then use one of the meta functions in your sidebar to display this data. Note that the custom fields UI may be hidden from view on pages. If this is the case, click the Screen Options tab in the upper right corner and tick the box … Read more
This is something you could accomplish with the Groups plugin. You could assign those capabilities to your authors within the defined group and only you would have the publish_postscapability.
Here is a function that you can pass either a single post id or an array of ids. Call this function in your function that adds the meta boxes. If the id or ids don’t match the meta boxes will not display on that post or page. function check_id( $id ) { // Get the … Read more
is_search() is going to return TRUE on every search you perform, so that won’t do what you need if I understand correctly. You’ll have to use a post_type conditional tag. But it shouldn’t be too difficult with something like if (is_search()) { if (get_post_type() == ‘type_1’) { //Do the right styling } else if (get_post_type() … Read more