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

learn more… | top users | synonyms (1)

0
votes
1answer
28 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
25 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
38 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
15 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
48 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
76 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
239 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
40 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
44 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
26 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
48 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
44 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
64 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
22 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
72 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
38 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
37 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
50 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
118 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
25 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
117 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
33 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
26 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
100 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
45 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
43 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
48 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
47 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
54 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
50 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
423 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
28 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
30 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
33 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
34 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
48 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
34 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
36 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
26 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 ...
0
votes
0answers
10 views

Avoid wp-load.php within a PHP/CSS file? [duplicate]

There was a similar question already but it uses ajax, and I am not. I want to have dynamic css in my theme, but I can't get the WP functions to work in my php/css file. In my functions.php file, I ...
1
vote
0answers
50 views

Media Upload , file name changed automatically

I face a problem that when i upload a video that named in non-english language , for example : Arabic , it placed in uploads folder with strange name Ùيديووو so it can't be access through ...
0
votes
0answers
22 views

Undefined offset from theme function with preg_match

I am trying to process ifttt [source_link] shortcode with function I found around. It works, but annoys in admin page with this error code: Notice: Undefined offset: 2 in /home/.../functions.php ...
1
vote
1answer
52 views

Advanced Meta Query for Large Calendar Website (12k+ posts) (175k+ wp_postmeta rows)

The Problem On a site I built, I opted to use custom fields instead of a calendar plugin to organize my posts in a "calendar". In the beginning this seemed like the most logical way to accomplish ...
0
votes
0answers
56 views

Using an iframe/plugin outside wordpress

I have Wordpress installed on my website, which I normally edit in dreamweaver. I use a few plugins in wordpress that are extremely useful; normally these generate their own page and I either use an ...
0
votes
0answers
14 views

Adding category in wordpress - custom

// Auto post ( Unique File Date ). $postData = array( 'post_category' => array( '0' ), 'post_status' => $Post_Status, 'post_type' => $Post_Type, 'post_date' => ...
0
votes
1answer
27 views

Problem adding class to body_class

I am trying to add additional classes to <body> based on certain conditions, so I have this code in my functions.php file of the theme : add_filter( 'body_class', 'custom_body_class' ); ...
0
votes
1answer
30 views

A Space being added to url generated by custom plugin

<?php /* Plugin Name: Convert Comment tag to link */ add_filter( 'comment_text', 'mh_commenttaglink' , 5000 ); function mh_commenttaglink( $text ) { // RegEx to find #tag, #hyphen-tag with ...
0
votes
0answers
16 views

Prevent multiple attachment with the same image

The plugin is designed to grab the user images from Instagram and insert them into media library, everything works fine on this part. I have set a transient with user selected refresh rate to check ...