The server-side programming language that the WordPress core, plugins and themes are written in.

learn more… | top users | synonyms (1)

0
votes
1answer
111 views

Notice: Undefined index: fix with isset [closed]

I have a variable storing data like this. $eddreldlc_auto_play = array( 'loop_true' => array( 'value' => 'true', 'label' => 'True' ), 'loop_false' => array( ...
0
votes
1answer
42 views

Deregister and Dequeue Stylesheets From a Plugin and Enqueue a Child's Stylesheet/s

I'm trying to Deregister and Dequeue 3 Stylesheets from a Plugin (WP Listings) and Enqueue 3 Stylesheets within my Child Theme's directory. I have tried using the following code, but all 3 of the ...
0
votes
0answers
40 views

PHP call div with function

I might be showing my green-ness with PHP code here, but I need help. I've got divs that are all styled the same but have differing content, as they are related product snippets to be displayed on a ...
0
votes
0answers
36 views

Dynamic $pageTitle tag variable

Here is the header.php: <head> <meta charset="utf-8"> <title><?php echo $pageTitle;?></title> <meta name="Description" content="<?php ...
0
votes
1answer
55 views

How to add author's posts link (HTML + PHP) inside a function to output it

I have this function on a theme which is a bit of code for a slider: function get_article_slide( $title, $excerpt, $link_article, $url_image, $title_length, $alt_image = 'Alternative text' ) { ...
0
votes
0answers
41 views

2 loops with pagination on a single loop

On a page I want to always show the most recent post on top with a different layout, and have the rest of the posts listed below. So I created a template page with these 2 loops. But I cannot figure ...
0
votes
1answer
113 views

Php warning /wp-includes/capabilities.php on line 672 [WP 4.1] [closed]

I have trouble finding the cause of a PHP warning on a website I maintain: [08-Feb-2015 10:16:46 UTC] PHP Warning: Creating default object from empty value in [...]/wp-includes/capabilities.php on ...
0
votes
1answer
85 views

“Notice: Undefined variable: content” is showing [closed]

I am using this code if for showing related content form custom taxonomy. But it is showing "Notice: Undefined variable: content" Here is my code: <?php /* Plugin Name: Related Post */ ...
0
votes
1answer
41 views

Custom meta box save values issues - Deprecated: Function ereg() and more

I'm a WP theme dev nobie and I have problems with saving custom meta boxes values. I found some tutorial where its explained how to do this. I have included a file called custom-meta-boxes-save.php ...
0
votes
1answer
32 views

Syntax error in a shortcode function

I'm trying to implement a taboola ad unit in a shortcode function, but I'm getting a syntax error. Below is the function that creates the shortcode. The code is in my functions.php file. Can someone ...
0
votes
1answer
27 views

Include administrator in author list

I have this code that is displaying my last active authors. I also would like it to display WP administrators in this list. The code is: $authors = array(); $count = 0; $args=array( 'post_type' ...
0
votes
2answers
42 views

Accidentally deleted php code in Wordpress website [closed]

I have a website: www.convert2latex.com . While trying to remove the "continue reading", I accidentally deleted some code and updated it in the theme editor's functions.php. Now the website does not ...
0
votes
1answer
18 views

List of child pages fetch next results at link click

I have a list of child pages which are getting displayed as links to those pages. Im displaying it in a certain div with a maximum of 6 results. What I want is I have a "a href" which is called ...
0
votes
1answer
65 views

How to disable wordpress confirmation email for new users

I need to disable Wordpress new user registration email confirmation link and auto generated password for new users. Users should be register with a password of their choice without email ...
0
votes
4answers
94 views

Is it legal to redefine wp_password_change_notification in a mu plugin?

I am trying to add some logic to this function of when to alert the admin to a password change but no email is being sent at all. The codex says it needs to be declared in a plugin, so is this legal ...
0
votes
0answers
288 views

Pass php to database in JQuery: With AJAX?

I have this plugin that adds a metabox to the post-page screen to upload multiple images. This works great however I'm missing one option. I want to add that function to the metabox. The problem is ...
0
votes
1answer
51 views

save metabox with new values _wp_page_template

I created a metabox to display the page templates and select a different one with a radiobutton selection. This is a replacement for the current page attributes metabox. I'm missing something with ...
1
vote
1answer
53 views

“comments.php” not available after edit in WP administration

In the theme "Point", the page "comments.php" is not translated properly. I wanted to translate the labels manually (to french) in the WP administration editor but when I update the file, the comments ...
1
vote
1answer
35 views

How to add a post or page tag to the list of classes appearing in the body tag's class attribute?

Good day, Perhaps you are willing to help out a php-beginner. I'm trying to add a post or page tag to the list of classes appearing in the body tag's class attribute. These classes are printed onto ...
1
vote
2answers
59 views

Custom post status not working

I'm trying to create two custom post status'. I used the Codex to generate the code and that didn't work. Then I went to http://generatewp.com/post-status and it didn't work either. It isn't showing ...
0
votes
1answer
25 views

Create server side text from wordpress page

I would like to store a wordpress page as text on the server for access in a custom application. Specifically I want a div of class '.entry-content' on a page url like below ...
0
votes
0answers
53 views

WPML. How to connect post translations from frontend form ( or throught php )?

My task is that user should be able to create posts from front-end. I'm using ACF plugin, for creating forms on front-end. My web is in 2 languages: Rus and Est. User can create on one of that ...
0
votes
0answers
75 views

File path for attachments outside of wp-content/uploads

I am creating some custom post creation pages with PHP. I create a simple post and want to attach an image I already have on my server to the post without moving it into the upload directory. I am ...
0
votes
2answers
27 views

How to add Post Tags to a new <meta> element in header.php?

How to add Post Tags inside a new element in header.php? I'm probably overlooking an obvious function in the WordPress Codex. I have tried adding these to header.php: <meta name="page-tags" ...
0
votes
0answers
98 views

Failed media upload: “The uploaded file was only partially uploaded.”

I am running Linux CentOS 5.8 and I have my web pages using WordPress 4.0. I am trying to uplad jpg photos to server via WordPress, but it randomly fails. I uploaded few photos, and then I get ...
0
votes
1answer
43 views

wp wp_register_script function results type parameter missing

I used the following code wp_register_script('jquery', get_bloginfo('template_directory').'/js/jquery.js', false, '',false); wp_enqueue_script('jquery'); It includes the script as ...
-1
votes
1answer
39 views

Change an option string to a function [closed]

I'm creating an options page for my theme where I can insert a code in a text field as a condition for displaying sidebars in my website. Let's say I'm inserting this value in the text input: ...
1
vote
1answer
60 views

Skt full width basic slideshow problem

Background: I am making a photography website and thought that skt full width is a good theme for the landing page. It worked out all right. Then I started to get fancy. I wanted my client to be able ...
0
votes
2answers
152 views

Display posts by month

I want to achieve something like this, I don't know if it is possible and what would be the best way to do it: The way I query the posts is like this: <div class="post"> <?php global ...
0
votes
0answers
40 views

Set featured image using wp_insert_post

// Auto post ( Unique File Date ). $postData = array( 'post_category' => array( $Category ), 'post_status' => $Post_Status, ...
0
votes
0answers
134 views

Embed google alerts rss feed into WordPress site

adjustment on my origonal question. How would I go about adding a new widget area to my current template so I can embed a google alerts rss feed? Cheers for any suggestions / solutions
0
votes
1answer
36 views

How to extract information from a wp_query result?

Background: I'm using a wordpress theme called skt full width. I am modifying their front page slideshow, so that it displays six random images instead of six pre-selected images. I have a custom ...
1
vote
1answer
31 views

How to get to a specific position in wp_query?

Background: I'm trying to display images in a slideshow, and I want to select those pictures randomly from the website's media. The image has a custom field in order to be selected for being the ...
0
votes
1answer
17 views

Two menus show up

If I set 'echo' parameters value to 'true': <?php if( has_nav_menu( 'primary-menu' ) ) { wp_nav_menu( $menuParameters = array( 'theme_location' => ...
0
votes
1answer
106 views

Pass important values server-side when processing form

I am working on a plugin that has the following within a <form> tag: <input type="hidden" name="postid" value="<?php echo $postid; ?>"> The problem with this is that users can ...
0
votes
1answer
54 views

How to replace URL protocol using PHP?

I'm using HTTPS everywhere in my website but I have problems with sharing buttons for Pinterest and Tumblr. For example, when I try to share image on Pinterest I get this error: "Sorry we could not ...
0
votes
0answers
50 views

AJAX call keep sending message

I'm working on a form from front-end which inserts a post via AJAX. Everything works fine but when I opened chrome's console in the wordpress-admin menu and click on the specific post type it keeps ...
0
votes
2answers
59 views

Disable Checkbox depending on state of another checkbox

I'm trying to disable a checkbox depending on the state of another checkbox. <form action="options.php" method="post" id="form_submission"> <table> <tr> ...
0
votes
0answers
58 views

How to create a php page to handle http request in WordPress

I want to have a page to handle the http request suck as xxx/app/api.php?id=7 and I create a php page in wordpress with redirecting by adding the following code to the end of the functions.php. After ...
1
vote
1answer
60 views

Trying to store submenu items to render out after main menu

I'm using a custom nav walker to render out the main menu, during this I want to store the second level navigation items to use/ render out later in a separate area of the page. I want these second ...
0
votes
0answers
67 views

Update table only if checkbox is clicked

I'm building a little home security project where it should be able to turn the system on/off from a website and by a password on the device. My problem seems to occur with the code from my website. ...
0
votes
1answer
512 views

Facebook php sdk 4 getSessionFromRedirect() always null

I have wordpress 4.1 with the following plugin installed: iThemes Security WordPress SEO I plugged in a function the facebook sdk. This is the code: //Footer add_action('wp_footer', ...
0
votes
1answer
38 views

ACF Unexpected T_CONSTANT_ENCAPSED_STRING [closed]

I'm running the Advanced Custom Fields Pro plugin. When I implement the following code for the repeater field, I get this PHP error: Parse error: syntax error, unexpected ...
0
votes
0answers
35 views

Wordpress search query

I used code snippet, from the plugin http://wpadvancedsearch.com/, which works very well, but when I press a search button, it generates the following string in the URL: /?search_query=& and I ...
0
votes
0answers
42 views

wp_title not showing for home page

ok so i tried this https://stackoverflow.com/questions/9055009/wordpress-wp-title-blank-on-index-page?answertab=oldest#tab-top and went to my function.php for my child theme and put the code in the ...
0
votes
0answers
39 views

Different ID in every shortcode

I am trying to make an Instagram-box on the author profile of my page. I need every profile to be different, and to do that I need to change the ID in my Instagram Widget-shortcode on every page. The ...
0
votes
2answers
51 views

Setting field not saving on front-end

I'm creating a theme option page and i try to display the values of two input in my front end : function register_my_header() { register_setting( 'header_options', 'header_options'); } ...
0
votes
0answers
41 views

Editing dashboard according to the userrole

I'm relatively new to PHP, I'm editing a plugin that restrict demo users with the role of (subscriber) from some capabilities, and it modifies the dashboard for the demo user(subscriber) and remove ...
0
votes
1answer
40 views

How to Display a List of Child Pages For a Parent Page in WordPress

I need to display child pages on my parent pages. i have a code that is working but i need to set some codes to only show specific pages like to only show visibility public not all the pages. this is ...
0
votes
0answers
28 views

Turn off Plugin Manually

I have installed and active wp-super-cache plugin, and It cached an PHP syntax error. I solved the error but can't run my website again because the error.log is still displaying the same error. I ...