This probably has to do with the custom query – it’s preventing other queries from working properly.
Setting a logo as a post seems an odd approach. Media attachments are already posts in and of themselves. Additionally, WP has a nice logo feature – custom-logo. I would add the logo that way and then just call the theme mod for the logo. That way you’re not adding an extra query that throws off other queries.
In theme’s functions.php:
<?php add_theme_support('custom-logo'); ?>
In theme’s header.php:
<?php the_custom_logo(); ?>
Related Posts:
- How to get the active theme’s slug?
- Which hook callback has priority if both plugin and theme use the same hook?
- How to send “Location” header on plugin form submit event?
- Uncaught Error: Call to undefined function get_user_by() after moving function from theme to plugin
- send_headers don’t work on wordpress multisite
- add_meta_box (Will display only in specific page admin WordPress)
- WordPress Redirect Not Working – AJAX Callback Response Not Picked Up
- All sites themes functions.php have been changed
- Why namespaces are rarely used in WordPress plugins?
- how can I do something on new user registration?
- Get ‘Headers already sent’ error for the plugin I am creating when I try to login
- Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection
- Use $variable from file1.php in file2.php (different file paths)
- How to make a dynamic css class whose name changes every visit to confuse scraper
- I receive taxonomy id
- How to include files relative to a file’s directory
- speed up pagination for huge database
- Inserting Plugins Into Blank Space of Externally Designed WordPress Theme
- Plugin Admin panel checkbox unchecked after submit
- uncaught TypeError: Cannot read properties of null (reading ‘classList’) custom plugin
- Custom Plugin scripts from admin working in frontend
- WordPress Cache delete on plugin uninstall
- Replace old theme that understand old css (vcex_icon_box css_animation)
- Prevent WordPress from sending set-cookie http header
- Remove a div class with condition
- Hooking into the HTML header container
- How to get a post views count using ‘WordPress popular posts’ plugin
- Modifying server’s response to API endpoint
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- I want add repository theme folder
- Things that saved lose when logout
- Woocommerce: deleted single-product.php, everything still works. How is it possible?
- What is the process for reimplementing a back up WordPress?
- Template from scratch: Sidebars not showing widget
- Display static pages instead of category, in code
- wordpress illegal string offset ‘parameter’ error
- Two sites one PC
- Real estate schema markup not showing up on Rich Results test
- Custom page template from plugin does not work with pre-installed themes in WordPress 6.6.1
- Plugin (or Theme) containing its own Plugins?
- How do I extend one plugin I’m writing with another I’m writing using classes?
- Adding a text domain to every __(), _e() and __n() gettext call without a plan to create own translations
- how to customize hello dolly plugin?
- Why users disable the WordPress update?
- Deleting images through upload folder, but not deleting from media library
- How to restrict an entire WordPress site to visitors, but the register and login page?
- How to exclude a widget from page 1 of a paginated post
- I can’t upload a new wordpress theme from a zipped file
- Adding a post shortcode to a page template?
- Sort products without thumbnail in WooCommerce shop page
- Create or Update thousands of woocommerce products via PHP
- Woocommerce sidebar not loading in theme
- Update Option Error: Notice: Undefined index
- How to get current post user id
- wp_redirect() not working in Insert PHP plugin in WordPress
- Unable to upload wordpress plugins
- The problem with WordPress Importer
- How to disable CSS rule in Twentythirteen style.css?
- Avoid class name collision when using third party libraries in plugins?
- How to get the element ID from new menu list that added with add_filter()?
- How to output CMB2 select options from repeated groups select elements?
- WP All Import – Execute Imports
- External RSS feed to WordPress Portfolio
- Create Gallery using Custom Post Type and add sum gallery as sub gallery of Main Gallery
- Adding media upload button to User Profile page (following a tutorial)
- Use different single.php file based on condition
- Pass user role to javascript code inside body
- WordPress Stock Update Programatically
- UTF-32be error WordPress
- Getting a ressource ID, from a WC_Order_Item_Product/Order
- Customize Menu | Styling LESS/SCSS code formats
- How I update WordPress theme and plugins
- Overwrite add_image_size defined by theme
- same user role or copy the user role to be same as the other role
- Getting URL GET parameter with Code snippets and storing it in database?
- admin-ajax.php 500 error when new users try to register
- Send Array from JS to php file then insert it in wp database through a plugin
- Offer Download Links for Product Images
- save_post_product action not firing
- How to get the custom field value using SQL query
- Possible way of having multiple Gutenberg instances for a page?
- Changing wordpress/woocommerce notices default message to other languages (text)
- Why does my custom plugin only function correctly once per page?
- I can’t view the orders on the woocomerce dashboard with the brainblocks plugin
- How to fix blog article view and share #’s?
- How to change the product short description for each product with PHP?
- plugins_loaded action is not working properly
- Creating a user ‘add custom field’ section
- WordPress function to add text
- TheCartPress plugin – Make every item in store unique
- Need Help Creating a Multi-Step, Video-Guided Enrollment Site
- Insert dynamic content into posts
- Can anyone see a syntax error in this? [closed]
- How to add a plugin in WordPress theme directory?
- Editing a theme
- wp_handle_upload – specified file failed upload test
- How to make a Template page to show the information of different things Shop and Product page?
- Split Million WordPress Post’s Into Multiple Database Server
- Conclude woocommerce-shipping-totals
- adding firstname and lastname on registration