WordPress Theme With Modified View

Sometimes the names can be misleading as home.php actually refers to the page that stores all of your blog posts. In general, use either page-home.php or front-page.php for the home page and then page.php for the rest. Whenever you have a specific page with a different layout, you can create a new template that is … Read more

Nav menus all outputting the same links

I have registered the following menus in my functions.php Note that register_nav_menus() which uses register_nav_menu() (note the singular “menu”) does not register or create a navigation menu; it only registers navigation menu locations which you can assign one or more (navigation) menus to, and for displaying the menus assigned to a specific location, you can … Read more

Warning: printf(): Too few arguments in helpers.php file

Your printf statement awaits additional string argument which would be substituted instead of %s: printf( // Filters text content and strips out disallowed HTML wp_kses( __(‘Read more <span class=”u-screen-reader-text”>about %s</span>’, ‘Sema’), [ ‘span’ => [ ‘class’ => [] ] ] ), “some subject” ); This example would produce the following output: Read more <span class=”u-screen-reader-text”>about … Read more

Adding the_content() return warning count()

I noticed this error myself too when using the Elementor plugin. It is only displayed when WP_Debug is set to true. The location of the warning is wp-includes/post-template.php. This is not a theme location, so the short version is that you’re not responsible for it. The error only appears when using Elementor. I think that … Read more

What form should the $query media query array have for an Elementor page builder function? [closed]

Preface There’s no WordPress-specific stuff in this answer, but I’m just trying to help since the official documentation is (as of writing) not very helpful.. But as I said in the comments, I don’t use Elementor, which means I don’t know much about Elementor’s technical stuff. ( Even the non-technical ones, actually.. 🙂 ) The … Read more

get_next_posts_link() returns no result despite available posts

get_next_posts_link() and get_previous_posts_link() are for linking between pages of a paginated post archive. For navigation between individual posts you want get_next_post_link() and get_previous_post_link(). Note the singular “post”. function myslug_render_post_navigation(){ echo get_next_post_link( __( ‘Previous post’ ) ) . ‘ | ‘ . get_previous_post_link( __( ‘Next post’ ) ); } add_action( ‘genesis_after_entry’, ‘myslug_render_post_navigation’ ); genesis(); I’ve noticed … Read more