Need help with custom fields

Posted in: Newspaper
Post count: 22

Hi all,

I am importing content from rss feeds using a plugin. It allows me to add content to a post and also custom fields. Everything works fine, but I also want to include content to a field called ‘Source Name’, ‘Source url’, ‘Via Name’ and ‘Via url’ at the ‘Post settings’. The plugin allows me to add content to custom fields, so I was wondering if the fields mentioned above are the so called custom fields, and if so, what are their names?

The plugin I use was able to identify only one custom field named ‘post_views_count’.

Any help is appreciated.

Post count: 7909

Hi,

I guess that you want something similar to this – https://forum.tagdiv.com/topic/how-i-can-save-in-subtitle-mysql-field-from-my-own-plugin/ and here is the source and via function – http://screencast.com/t/XTg7sdbl

Thanks!

Post count: 22

Thanks a lot for the quick reply.

I am not a developer so things take a while for me to really understand. So if I understood correctly and just to confirm…

‘Source Name’ : ‘td_source’
‘Source url’ : ‘td_source_url’
‘Via Name’ : ‘td_via’
‘Via url’ : ‘td_via_url’

Is that correct?

Cheers!

Post count: 22

It didn’t work with these field’s names.

Do you think I will have to update (and adapt, of course) the following into the theme?

// save from td_subtitle to td_post_theme_settings->td_subtitle
$td_subtitle = array(‘td_subtitle’ => get_post_meta($post_id, ‘td_subtitle’, true));
if ($td_subtitle != ”) {
update_post_meta($post_id, ‘td_post_theme_settings’, $td_subtitle);
}

Cheers!

Post count: 1291

Hi,

The values are saved in “td_post_theme_settings”, you can see on the output code how they are retrieved – http://screencast.com/t/plAHcugQ4loqhttp://screencast.com/t/2roD5laic

Thank you!

Post count: 22

It worked, Emil!!!! Amazing!!!! Woohooooo!!! Thank you so much, mate! You are the champion!!!

Post count: 6

Zankkasz, did you have to modify the theme in any way? and if so what did you do? I am having a similar with my front end plugin(Ninja Forms).

Thanks,
Rob

Post count: 22

Hi rcarroll989,

I didn’t need to change anything on the theme itself. I am using a plugin called WPAllImport to pull content from sources and populate my website. The plugin has an area where you can add the customs fields’ keys so it can populate accordingly. With Emil’s information, I was able to use the appropriate key in order for the plugin to do its thing. That was it.

What are you trying to do exactly?

Cheers

Post count: 22

Hi guys,

Another question related to custom fields.

How do I add a featured video via a custom field? I tried using the keys ‘td_post_video’ and ‘td_video’ but it didn’t work. Any help will be appreciated.

Thanks!

Post count: 7909

Hi,

It wont work just by adding the key. Using featured video it will pull also the video thumbnail – http://screencast.com/t/47NAbbXS9qXnhttp://screencast.com/t/hmAMq7cwKf
I suggest to hire someone if you need this as it is not an easy task and we cannot provide custom work at this time, sorry!

Thanks!

Post count: 22

Could you give me any direction in terms of what exactly needs to be done and then I will do some research and to try to do it myself?

Thanks!

Post count: 7909

Hi,

Please try the following steps:
*Create a custom field – http://screencast.com/t/SYujEbhx
*And add the following lines – http://screencast.com/t/CIkChsnUtRlRhttp://screencast.com/t/keth1I6Vill

Thanks!

Post count: 22

Hi Alin,

Thank you very much for the help.

The custom field area that was supposed to show up at the edit post page isn’t there. Do I have to install any specific plugin for this?

Cheers!

Post count: 22

Forget what I asked, Alin. I found what was the problem (screen options)

Post count: 22

Ok. I did what you suggested and at the test post, it pulled the thumbnail but didnt add it as featured video. When i tried to use the the key/value thing at my import plugin, it didnt work as well.

Any ideas?

Cheers!

Post count: 22

Hi Alin,

I did some trials and it did work, but apparently with a cost: all posts where there is a youtube video embeded inside the actual post content, the video doesn’t get rendered. I will explain a bit better with steps I took.

1) I add the youtube link inside the post and the theme renders the video
2) I then click publish and the video disappears from the post.

Can you think of any workaround to make it work?

ps.: I forgot to mention that the featured video section at the post edit is not working anymore. Instead, to be able to add a featured video I need to use the custom field key ‘my_video_url’, which I don’t see as a problem to be honest. The only issue is that apparently I can’t add videos inside any given post anymore.

Cheers!

  • This reply was modified 10 years by zankkasz.
Post count: 2

Hi zankkasz,

i’m trying to achieve the same but without luck.

In WP Import All i filled the custom field settings to the mentioned fields (e.g. td_post_theme_settings[‘td_via’] ) but it didn’t worked. Could you explain what you have done to get the via / source fields filled with values?

Many thanks in advance.

Best regards

Post count: 22421

Hi,


@ChristianJW

Unfortunately these plugins are not tested so we cannot say for sure if they will work or not. We simply provided zankkasz with the keys for the source and via so I assume he used them with the plugin somehow. We have no clue as we have not tested the plugin.


@zankkasz

Sorry for not providing an answer for such a long time. This topic must have slipped somehow. unfortunately we cannot help you any further in this matter. this represents custom work and falls beyond what support can provide. Please consider hiring a freelancer to help out as time simply does not allow us to test plugins or customization.

Thank you for your understanding.

Post count: 2

Hi Bogdan,

thanks for your reply.
The plugin writes the value to a custom field ( td_post_theme_settings[td_source_url] -> newspaper source url field, right?). But the post doesn’t match this custom field to the newspaper via / source field. I’ve tried the td_source / td_source_via / td_via / td_via_url without success.

https://dl.dropboxusercontent.com/u/2695350/Shared%20Screenshots/Screen%20Shot%202016-04-05%20at%2017.47.08.png

Any ideas?

Many thanks in advance

Best regards
Christian

Post count: 22421

Hi,
Make sure you use the same plugin. XZankkasz used WPAllImport but there are multiple instances to this plugin: http://screencast.com/t/qNtTpMSCgs . If it’s not the same one maybe it will not work.
The keys are the same as you tried above and the same as Emil pointed out. You will have to try out a few different implementations for it. Sorry but this is not tested so we cannot offer any solutions.
Thank you!

Post count: 22

Hello, everyone…


@ChristianJW
: I did exactly what the guys here at support suggested me and it worked. As my website is not live anymore, I kind of forgot if I did any other thing to make it work. I do remember that on WPAllimport there is an area where you can add the custom fields and it works very well, as far as you put the right keys, which is the ones the support guys suggested back then. If you need any other assistance with WPallimport, feel free to reach out to me. It’s ok. We can do a skype chat, if you prefer.


@Bogdan
B.: it’s ok, mate. No problem at all.

Have a nice day, everyone!

Viewing 21 posts - 1 through 21 (of 21 total)
The forum ‘Newspaper’ is closed to new topics and replies.