You are using a local loop, so template functions won’t behave as expected without a $post
parameter:
<marquee>
<?php $latest = get_posts('numberposts=5&cat=13'); foreach( $latest as $_post ) : ?>
<a href="<?php the_permalink( $_post ); ?>"><?= get_the_title( $_post ); ?></a>
<?php endforeach; ?>
</marquee>
Related Posts:
- Remove Actions/Filters added via Anonymous Functions
- Is it possible to rename a post format?
- How to paginate the get_users function?
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- How to add classes to images based on their categories?
- Child theme – overriding add_image_size by a child theme [duplicate]
- Compare post levels and user levels wishlist member
- Generating Responsive Background Image Sizes in PHP
- Change ul class=”children” for wp_list_pages?
- Target a certain page within wordpress backend (admin) i.e. Pages > About
- Set default options for inserting media
- Session is not starting
- Override a class function to include a custom template
- How to auto-update child posts whenever the parent post is updated?
- the_post_thumbnail fallback using hooks
- How to detect first visit of a user?
- Hide WYSIWYG editor on certain templates
- Polylang: pll_e() & pll__() on functions.php, doesn’t work
- Disable shortlinks like ?p=1234 to prevent scraping
- Redirect a list of URLs to another URL, using functions.php
- Override woocommerce wc-class function
- WP_Remote_Get Not working
- Debugging with functions.php
- Getting first Image from post
- Inserting a functions output after the content
- Combine two different filter callback functions
- Don’t delete a page if it holds users
- How to limit character length in BuddyPress function output [closed]
- Ordering posts by publish date not working?
- Is possible add icon in title posts only in specific tag?
- Wp_schedule_event functions.php
- How to install Segment on WordPress without a plugin
- How to search using ajax for exact phrase or words in an input field?
- Can’t generate thumbnail images
- Multisite 404 on pages – rewrite error breaks database
- Dashboard widget custom positioning?
- Display tags that only appear in one category
- Need help “sanitizing” a custom function that pulls category slug into body class
- How to get data from an array using get_user_meta()
- Space Not Being Generated in HTML Output?
- How to display retweet count and likes in the meta above the excerpt
- Auto Generated HTML source code formatting
- Do not show on homepage functions.php code needed
- How to cut off question mark in url with functions.php
- Undefined variable error in new function
- How to rewrite wordpress search to work on specific category
- How can I show immediate and/or parents in a title?
- Add Login/Logout Menu Item to Primary Nav “My Account” Submenu [Woocommerce] [closed]
- Theme JS is available but theme CSS isn’t
- Genesis Framework: How to exclude a specific author from archive custom loop
- Best way to disable sidebars on posts (only)?
- Passing Jquery value to WordPress function
- How to pass variables from one function to another or combine functions
- How to create a shortcode out of a php function
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- Insert Content Before div#main from the functions.php File
- How to override this theme function in child theme
- Insert function insde body tag
- Unable to add extra elements to the main navi (wp_nav_menu_items)
- Internet Explorer opens links to .msi files as text in a new tab
- call wp_insert_user in custom class doesnt work
- Overwriting TwentyTwelve template file with child theme template, but lower in the hierarchy
- I would like single.php to act just like index.php
- Does WordPress has an automatic link parse function?
- A better way to get stats
- Get URLs for AJAX Filter Checkboxes WordPress
- Is it possible to load recaptcha script only in url with fragment identifier (#)?
- page shows short code not output
- How do I trigger WP CLI DB export using a PHP function?
- Scheduled post delete – can’t pass the cron arguments
- Prevent function from triggering on current page
- Assign IDs to headings in ACF using functions.php
- Multiple Notifications SetInterval
- Redirect specific author posts to another url
- Child Theme not loading multiple stylesheets
- Show number of sold products but be first for less than 2
- How to retrieve image IDs from shortcode content?
- Class::$template_dir_path=get_template_directory();
- admin-ajax.php & my wp-admin folder url showing in header
- WordPress – Custom Nav menu for logged in users – Shopkeeper theme
- Change post count on tag/terms pages to 10
- Post date on Custom field
- Fatal error: Call to undefined function add_action() – an untouched problem
- Author info does not show up when author has no posts
- How to wp_enqueue_script with html?
- Is it possible to change parameters of Parent theme function in the Child theme?
- Error function main() is a non-object to construct my Ajax.php
- Unregistering custom tinymce plugin?
- Combining wp_current_user() and a variable
- Init hook for header send
- java script error Uncaught SyntaxError: Unexpected token ILLEGAL
- Gravity Forms After Submission – GFFormsModel::update_lead_field_value?
- Fatal error after changes to functions.php, even with original file
- site_url is not honoring scheme
- Should I use `get_stylesheet_uri()` or `get_template_directory_uri()` when calling my CSS Stylesheet?
- new to javascript – using in instead of functions.php, not loading correctly
- Remove Disqus JavaScript from homepage
- Missing argument 2
- How to overwrite image if it already exists – WordPress, Gravity form
- Change TinyMCE undeline outpout