Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Saved Meta Values Don't Display On Front End Page WordPress



I'm running into some problems getting the saved values in the database to be correctly displayed on the page, in fact the information does not want to show at all.

Some modifications have been done to the WP RSS Aggregator plugin.

Namely this plugin file has been modified: includes/admin-metaboxes.php
Modified file code:

And I'm using this code to loop the feed entries:

For some reason the image that I upload when I create a new feed source is not displaying, and the Feed Source Title is also not displaying.

Feed Image meta key: wprss_uploadvalue
Source Title meta key: wprss_sourcetitle

When I search for these values in the database after saving I see they are saved in the database, but for some reason the code doesn't want to output the values.

What is required to make the values display correctly?

Thanks in advance for your help!

Answers (6)


Thierry Pigot answers:


Where do you want to display the image ?

If it's in the feed list, you have to also edit the function <strong>wprss_display_feed_items</strong> in <strong>wp-rss-aggregator.php</strong> file

Edwin comments:

Hi Thierry, thank you for the suggestion and looking into this. All needed edits are now completed though.


Dbranes answers:

It looks like you are fetching the meta value for a wrong post ID,

The <em>get_the_ID()</em> you are using are for post types <em>wprss_feed_item</em>
but the <em>wprss_uploadvalue</em> meta value is saved for post types <em>wprss_feed</em>.

ps: <em>query_posts </em> is "old school", you should consider the <em>WP_Query()</em> or the <em>pre_get_posts() </em> hook instead.

Dbranes comments:

You could use this code inside your loop:

$feed_id = get_post_meta( get_the_ID(), 'wprss_feed_id', true );

echo "wprss_uploadvalue = " . get_post_meta( $feed_id, 'wprss_uploadvalue', true );

to get the <em>wprss_uploadvalue </em>meta value.

Edwin comments:

Thank you!- this was very helpful!


Giri answers:

Let me explain something.. Your rss aggregator has two post types.



Rss feed items are stored in "wprss_feed_item" post type.. But your uploaded images, title are stored in "wprss_feed" post type..

So here is my modified code.

[[LINK href=""]][[/LINK]]

I'm using the post id manually in my code. Which means you should go to

rss aggregator -> All feed sources -> edit -> copy the post id from url -> change the post id in my code

Change line 29 and 31 with that post id

Giri comments:

I updated my code. Change the post id only in line 29

Edwin comments:

Thanks Giri for your provided input, it's very much appreciated.


Arnav Joy answers:

can you share your db?

also have you checked without doing modification in plugin file did you getting output?


Remy answers:

Did you try to display all the custom fields values to see what is returned ? Using get_post_custom() for example : [[LINK href=""]][[/LINK]]

Edwin comments:

I've tried various debug plugins, oddly enough, the expected meta values did not show.

The needed edits to get everything to work as needed are completed now by another developer.


isp_charlie answers:

just check "get_the_ID()" value make sure it not empty