I searched through their theme files and found that they get a query for that page with a custom function:
function get_last_weeks_top_stories($count = 10)
{
$last_weeks_top_story_ids = get_option( 'last_weeks_top_stories' );
$last_weeks_top_stories = new WP_Query(
array(
'post_type' => 'news_entry',
'post__in' => explode(',', $last_weeks_top_story_ids),
'posts_per_page' => $count
)
);
return $last_weeks_top_stories;
}
Here I can see they are retrieving the IDs stored in 'last_weeks_top_stories'
, and if I go to their wp-admin/options.php page I can see the ID’s being retrieved in there. It appears to be pulling the ‘correct’ posts based on the data in that options file, so this leads me to believe the issue is not with getting the correct data, but whatever is SETTING the most popular posts from last week. This is where the problem is for me.
I would think that there would have been some place in the theme or plugins files that would have an add_option()
, but I cannot find where this option of 'last_weeks_top_stories'
is being set at. I have downloaded the entire plugins and theme folder and searched through the files for any mention of ‘last_weeks’ and nothing comes up.
They have a plugin installed called WordPress Popular Posts so I was thinking maybe they would be utilizing that, but I cannot see anywhere where that field would be created within that plugin either, or if that is even what they were using to populate the option anyway.
Does anyone have any suggestions on how I could find out where this 'last_weeks_top_stories'
option is being set?
Thank you!
]]>in my plugin I would like to have several settings / options to be saved in DB.
basically my plugin has its own “settings” page under its own menu item in the maine WP menu.
i just would like to know if the functions: add_option() and add_options_page can be used ONLY when settings page of plugin is stored under the main WP menu item “Settings” or if they can by used also on custom settings page of my plugin (under its own Main WP main menu item)?
thx
]]>Thanks
Mike
https://www.ads-software.com/plugins/pjw-mime-config/
]]>The issue is that my site has the white screen of death (no login) when either the WordPressImporter plugin is turned on, or the plugin Members Access (by Chris Abernathy). This is not the only issue though.
Also when either or both of these plugins are turned on, the css for my site is messed up. The nav is pulling in completely wrong, and certain areas have incorrect fonts. This leads me to believe there’s more of an issue than two plugins fighting over a js file.
When I turned on the debug in wp-config, I get the following error:
Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /mnt/stor1-wc2-dfw1/469547/756542/www.cefgreenville.com/web/content/wp-includes/functions.php on line 3497
Any suggestions as to what I should try next?
Also, two notes: I didn’t build this website, I’m just managing it. And the issue was present before I upgraded WordPress and all my plugins. I updated in hopes there was a bug fix in one of the apps, but updating has changed absolutely nothing.
Thanks!
]]>Example of what I’m hoping to achieve:
(in the visual editor)
“To get in touch, please call [option:phone_number] during business hours.”
Does WordPress natively support anything like this, and if not, how would I go about achieving this?
]]>Is this a concern? What do I do about it?
Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /home1/XYZ/public_html/wp-includes/functions.php on line 3008
Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /home1/XYZ/public_html/wp-includes/functions.php on line 3049
]]>Query Monitor produced this report for me (https://pastebin.com/xLAgA338), which I’m sure is helpful, but I’m having trouble pinpointing the problem. Anyone have ideas?
It looks like rewrite rules called by add_option are part of the problem, as are selects from update_meta_cache. If that is actually the problem, how would I fix this?
]]>I’m trying to use the add_option. But every time I submit my form it doesnt work.
I’ve try to var_dump the get_option it said it have a string, but when I refresh the page again it is gone. What i’m I doing wrong?
Are you likely to update your code soon to address these warnings??
13x
Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in C:\wamp\apps\wordpress\htdocs\wp-includes\functions.php on line 3553
Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in C:\wamp\apps\wordpress\htdocs\wp-includes\functions.php on line 3551
Thank you very much
https://www.ads-software.com/extend/plugins/wp-youtube-player/
]]>