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
- I have issue to retrive post thumbnail with rest api
- Custom page template from plugin does not work with pre-installed themes in WordPress 6.6.1
- I don’t understand how this parameter works..?
- Why wp_mail() function isn’t sending any emails and displaying ‘0’ in Chrome ‘Network’ response
- How to initialize something in unit test before the init hook being called?
- Implement plugins as part of a theme
- How can I list recent posts excerpts?
- adding meta data using plugin to top of head
- How to remove all javascript in a theme wordpress?
- wordpress theme backend admin only
- Missing argument 3 for wp_register_sidebar_widget()
- Make id column as AUTO INCREMENT on plugin activation
- How to Include a Loop Template File in a Plugin
- Write to / remove from default .htaccess file from plugin?
- Deactivate Plugin on Theme Switch
- Update Option Error: Notice: Undefined index
- How can I display a contact form for out of stock products in WooCommerce?
- ‘Customize’ button in admin bar for CSS
- Pass a php string to a javascript variable
- get shortcode value
- How to get number of Affected rows from wordpress dbDelta() function
- Unable to install theme recommended plugins on Multisite
- Theme or Plugin: Where should I write my code?
- Show price with Geo IP location
- WordPress Ajax Callback
- Add category to body class
- The called constructor method for WP_Widget in GFWidget is deprecated since version 4.3.0! Use
- Plugin Development sqlite or WordPress’ database
- More than one text-domain is being used because of the included templates for plugins
- How to review WordPress website php version compatibility?
- Plugin Deactivate Self on Activation Errors
- printf – problem to understand code
- Custom Post Type Plugin not loading category template and loading 404 instead
- How to Know if a Plugin can be used with my Theme [closed]
- Sending email from inside a plugin using PHP PEAR
- Auto delete WordPress users according to time
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- How to trigger $_GET request within admin plugin page?
- Wp favorite posts get user favorites in profile using buddypress [closed]
- Storing Options in a Shortcode
- Why isn’t admin_notices displaying my text? [Simple Plugin, Beginner]
- How to generate video out of images via WordPress plugin
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- How can I get WordPress to save comments in markdown format?
- add_query_arg not working
- problems with wordpress and php version 5.3.3-1
- WooCommerce get_price returning wrong price when used via ajax
- How to ‘clone’ a wp plugin to make small changes
- Not able to open category post [closed]
- Open Post Thumbnail in New Child Theme File in WordPress
- add mediaelement.js plugins into WordPress video player control bar
- Shortcode button dosent work for all posts. Work for first post only
- Where should I save an API key of my user when installing my plugin?
- Prevent a plugin from being automatically activated
- Reusable functions and tools (Framework)
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Programatically download a plugin
- Accessing post’s meta data based on user’s click of a post
- How To Clean The Malware Infected & Hacked WordPress Websites? [duplicate]
- Do I still need a theme to use page builders?
- Error shown for Trying to get property ‘roles’ of non-object in WordPress After Content for User Roles