If your Loop is constructed correctly $post
will be set for each post in the loop in turn. You could also consider using get_the_ID
.
get_post_meta($post->ID, "user_submit_url", true);
by itself won’t do much. You will have to format and echo
the information but that should retrieve your post meta data.
For example, to generate a link (assuming your meta value is an URL and that you’ve save a string and not an array):
$meta = get_post_meta($post->ID,'user_submit_url',true);
echo '<a class="meta" href="'.$meta.'" target="_blank">'.$meta.'</a>';
If your theme has a category.php
and you want this only on category archives put that code in category.php
. archive.php
is used by all archives that do not have a specialized template– tag and author archives, for example. The template hierarchy is explained in the Codex.
Related Posts:
- Sort category page with custom field
- How to get category and archive title?
- Get rid of WordPress category, tag and author archives?
- Category archive by year with permalink support /category/YYYY
- get_categories for custom post type with a specific custom taxonomy attached
- How To Modify The Loop in archives.php To Have 11 Posts Per Page and CSS Styling
- Order get_terms() By Custom Field
- 404 Error On Category and Tags Pages
- Force WordPress to Show Pages Instead of Category
- Decreasing the Memory Consumption of a WordPress Site?
- What’s the URL for a category archive?
- get_field not displaying my custom field value
- Sort posts by tags in category pages
- How to get the category of the post and link it to the archive (of the category)
- Add extra fields to Add New Category page
- How to hide a specific category posts in my monthly archive?
- Optimal way to redirect home page to category archive?
- Display posts links from a category group by year
- Display list of Sub-Categories and the posts they contain, within one main Category
- Need help adding custom field to category
- adding custom fields to next and previous post link
- Custom query with category exclusion and post-meta “whitelist”
- Create a full width responsive header image per page
- How to create tabled index of posts in a certain category
- How would you create a “weekly” archive?
- Sticky Posts Not Sticking to Top of Category Archive
- Root level category, tag, author and archive pages to work
- Category Specific Archive
- How to have Multiple Archives Widgets, one archive widget per category (in a different page)?
- Are Custom Taxonomy Templates Possible?
- “Sticky” posts for each category (archive.php)
- I want exclude the particular category in sidebar
- Return category slug / title from category ID
- How to filter archives both by category and tag?
- Remove Archive Headline and Archive Intro Text fields on category and tag archive pages in WordPress Admin with Genesis framework
- Display only posts from referred category on date archive page
- Using widget logic I want to show only a widget on the archive page if there are no posts
- What type of page should i use? static page or category page? and what’s the difference? [closed]
- Filter out posts before display category count
- How to put enctype=”multipart/form-data” in categories form?
- Creating archive pages for children categories
- Add custom taxonomy under the category title
- Display “add to cart” button on every listing in product category page?
- WordPress categories being called “archives” in google links. How to remove?
- conditional for sub category on archive page
- Sorting posts by season
- weekly archive for custom category
- WP_Query() returns null when results exist!
- WordPress subcategories return 404 in custom template
- How to remove category titles?
- Show archives by year from just one category
- Archives for each category on WP Multisite
- How to call custom category field data in theme?
- Category index featured image
- Archive.php filtered by pre-determined category
- query in category.php repeats itself
- How do I call posts with a certain tag?
- need to add custom field in more products
- Category being displayed without base parmalink
- How to change category and year archive permalinks/rewrite rules?
- Retrieving category’s color with get_term_meta
- How to change a post category when the ACF datepicker Field is today
- How can I define a custom archive for childs of a specific category?
- Get parrent category name
- Restoring default article pagination on archives – Removing custom limits
- Category archive rewrite rule to include category/subcategory?
- add_rewrite_endpoint returns 404 on archives
- Multiple category archive page
- Custom archive.php: retrieve right post categories?
- wp_dropdown_categories() scripts working erratically on sidebar
- Yearly Archive for Categories with dropdown
- Listing Texts of Which Custom Field is Null
- How to “group” (categorize) the Pages together?
- Category archives with monthly pagination
- Customize category page for different custom taxonomies
- How to query categories with Advanced Custom Fields?
- How to add custom color fields to the category edit page?
- Notice: Trying to get property of non-object in : custom fields category
- Category archive is displaying all posts rather than the specific category
- How to Remove a Title from All Category and Tags Page?
- echo get_post_meta of all post in a category to fill up a select field
- Do not show sub categories in the loop on archive-product.php
- About title on a page
- why get_the_post_thumbnail( the_ID()) echos extra post id
- “Virtual category page” based on a custom field filter
- display category list year wise in wordpress
- How to display post in custom file not in archive file?
- ACF no print data [closed]
- WordPress showing wrong category name
- Media (images, videos, etc.) not showing on Category page
- WordPress monthly archive category specific
- Problem with multiple loops in wordpress theme
- Displaying year once in category.php [duplicate]
- what file I need to create to work date archive links?
- Archive filtering
- Show Secondary Sidebar on Category pages (archive)
- Rebuilding a Site: How to Show Several Category Posts in Woo Framework Theme?
- Assign a custom post to a custom taxonomy based on custom field value
- Add multiple orderby with pre get posts
- Custom Fields Value As Taxonomy