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

learn more… | top users | synonyms (1)

0
votes
1answer
21 views

Save selectlist value (taxonomy) in wp:wp_set_object_terms

In my admin for part i have additional fields (like price or brand - which is taxonomy). When i edit or create new part, i set up additional data. and price saving is without any problem, but saving ...
0
votes
1answer
13 views

How to overwrite orderby with add_query_var

So I would like to have an archive that displays its posts in a random order. <?php $query = new WP_Query($query_string."&orderby=rand"); ?> But also then if the user chooses they ...
0
votes
0answers
30 views

Auto order posts of custom post type by title

I have a custom post type which has more than 50 posts. I want to reorder them alphabetically so that each time I post anything the system automatically reorders. Please don't suggest post order ...
-3
votes
0answers
15 views

Blank successful page

Please help me guys.. Recently I don't have every successful page or alert in wordpress. It's just directed to blank page. I'm afraid something broken, replaced, or overwrited some files. Anyone ...
0
votes
1answer
21 views

How to use PHP code with wordpress page

new user to WP. I am dynamically creating HTML tables with SQL data in my PHP. WordPress pages do not allow PHP code, and I've been hounded by individuals not to use a PHP plugin due to security ...
0
votes
1answer
24 views

Why does “get_option” pull in the older value in options.php, rather than the newer value, on submission of a form?

I'm building a simple post order "plugin" through my theme's functions.php. The function updates the value of an option in options.php on submission of a form. So, for instance, when "1" is inputted ...
1
vote
1answer
2k views

Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page

I am working with custom post types and I had trouble with the nav menu not getting the .current-menu-item on my custom post archive page menu item. In fact, when I was on that page or any of the ...
-1
votes
0answers
21 views

Generate PDF files from post meta [on hold]

First time I am doing this and need some experienced eyes on this so it's difficult for me to offer an example if I am not sure which library to even begin with. Currently, we're using Advanced ...
8
votes
1answer
99 views
+50

Are WordPress Heartbeat API 'beats' staggered or do they occur simultaneously for all users?

The WordPress Heartbeat API uses admin-ajax.php to run AJAX calls. If User X leaves their browser open, many calls will be made to the server, with each call happening when there is a 'beat'. Now if ...
0
votes
1answer
57 views

Shortcode Display From Wordpress Dashboard Page Without Using post_id

I have this code for showing recent posts on my home page custom theme and it works well. functions.php code: function my_recent_posts_shortcode($atts){ $q = new WP_Query( array( ...
3
votes
1answer
1k views

Allow HTML in excerpt

Here is my excerpt code. // Generate custom excerpt length function wpbx_excerpt_length($length) { return 300; } add_filter('excerpt_length', 'wpbx_excerpt_length'); How do I allow html like ...
0
votes
1answer
645 views

Error: options page not found

This error is really well known and every where I look its either I am not doing: <form method="post" action="options.php"> or I am not registering my options, which is not the case as seen ...
0
votes
1answer
32 views

Show only first child in dropdown

I have a dropdown showing a custom taxonomy with multiple levels (children). Below is the code for it. Can someone please explain how I can limit the children shown? For instance, at the moment it ...
3
votes
2answers
303 views

Getting the comment number relative to all the post's comments

Any ideas how to accomplish this? Something like this would work, but if there are threaded comments you get the wrong number, because pages with threaded comments have actually more comments than ...
0
votes
1answer
26 views

Second foreach in the loop returns bool(false) though array is present

In my code below the data is extracted correctly for the first foreach, but doesn't return anything for 2nd foreach although selected one present inside the 2nd foreach. I still get the error ...
1
vote
2answers
298 views

Selectbox in admin panel function linking to CSS

I want to link the selectbox to my CSS. Like if I click an item on the list, the background of my header will change - the header's color is in the CSS. The selectbox isn't in the html but it's in ...
0
votes
0answers
8 views

Azure Management from Wordpress [migrated]

Microsoft has up to 3 additional slots aside from "production" now for Azure websites. I wanted to write a management page in php for allowing content administrators to swap between staging and ...
0
votes
0answers
43 views

Display image from an external rss feed on wordpress without plugins

I am trying to add an external RSS Feed to my wordpress theme. Displaying the feed content and title was a success. But I don't see any option to display the image from the external feed. I tried ...
0
votes
0answers
15 views

Page doesn't load

I have following code, but my page doesn't load anymore. What is wrong? require( plugin_dir_path( __FILE__ ) . 'menu.php'); require_once( plugin_dir_path( __FILE__ ) . 'getuser.php'); add_action( ...
5
votes
2answers
704 views

How does Wordpress support Unicode?

I've been looking through Wordpress' codes and they're mostly using PHP's regular string functions, like strlen, strpos, etc. Yet I know Wordpress supports utf8, so how does it do that? Does it ...
2
votes
2answers
285 views

Dynamically add id to heading tags

How do I add an id attribute dynamically to every heading tag on a wordpress website using php? I wanted to make it so that for every heading tag (h1, h2, h3, h4, h5, h6) I have a unique id attached ...
0
votes
1answer
52 views

Random Custom Post Type

So i have a custom post type, and everything is correct when displaying. But i want that the custom post type appear random. I tried orderby => 'rand' but probably not in the right place and probably ...
0
votes
1answer
34 views

Accessing an API with jQuery and AJAX

As a proof of concept I'm trying to access an API using jQuery and AJAX and posting the results to a page. After following some online tutorials and doing my best to put it all together, I have the ...
0
votes
0answers
19 views

Remove all nav menu classes except those which begin with certain letters

I'm currently using a function which strips out all the unwanted classes from my nav menus, leaving only the classes I want to keep (the ones listed in the array inside the function). It looks like ...
-1
votes
0answers
10 views

Global JS variables [on hold]

Ok, here's the basic idea. I want to have one javascript activate another. It seems like a fairly straightforward idea. I have my first js file set a variable to 1, and my second js file start with an ...
-1
votes
0answers
22 views

Wordpress CMS importing only for the frontpage?

I use a WordPress Masonry template, so what i tried to did was i copied all the code from my index.php and used the copied code as a FOOTER WIDGET (i have modified my functions.php file. I am allowed ...
0
votes
0answers
15 views

List of products (only view) [on hold]

I'm searching to show a list of products in the user front-end. In my back-end I created some fields with this content: '0' and I would like show to the users if the content is '1'. Exemple ...
0
votes
1answer
12 views

How to redirect unattached image attachments

I'm currently redirecting all attachment images to their parent post with the following function: function attachment_redirect() { global $post; if ( is_attachment() && isset( ...
-1
votes
1answer
19 views

Does WordPress create a new Linux user when creating a new WordPress blog?

I wonder if WordPress creates a new Linux user when creating a new WordPress blog? I am a NodeJS developer, but from what I know PHP scripts can also have access to entire file system. That's why I ...
0
votes
2answers
245 views

Get the alt text of the image in a array

I have a php code. That put the thumbs on the screen. I have this: <?php if (has_post_thumbnail()) : ?> <div class="image"> <?php $attachment_id = get_post_thumbnail_id(); ...
0
votes
2answers
80 views

Filter second dropdown (tax) based on first dropdown (cpt)

I've been googling and attempting this for over a week now with no success. I have a few custom post types (books, films, music etc), and a custom taxonomy (location). On my frontpage, I have two ...
0
votes
0answers
12 views

Ai1ec - Event Query [on hold]

In regards to All-in-One Event Calendar: Custom Query - Getting each event Instance post (Here), how do you incorporate this code into my existing code? I'm was calling queries straight from the ...
2
votes
2answers
319 views

multiple files in wordpress plugin

i'm trying to write a plugin with multi files, i'm sure i did it before without a problem but now i have the problem in the subject. in the main plugin file i included a file name - ydp-includes.php, ...
0
votes
1answer
18 views

Auto delete Wordpress users according to time

In my wordpress site spam users are registered so i am add mail confirmation to my resister area. And my problem is how can i delete users when not check or activated the mail. is it possible to ...
0
votes
0answers
25 views

How to 'remember' a site member's last visited page?

I've seen this on a couple of sites - they offer a multipage tutorials to site members. When you return to the site, they have a link that takes to the last page of the tutorial you were on. How is ...
0
votes
1answer
9 views

How to Add Image to Wordpress RSS-Feed with no Plug-in?

I have searched for adding featuring image to rss feed with no plug-in for WordPress. I have found some examples and applied how it was instructed. But All I have got now is nothing. Still can't ...
0
votes
1answer
20 views

How can I programmatically save data into custom fields that contain serialized data?

I purchased a theme from themeforest recently that has a custom post type. Here is a link to a page that's been created with the custom post type: ...
0
votes
1answer
29 views

How do I programmatically add items to a custom post type?

I have a custom post type to which I'd like to programmatically import data. I have followed these instructions and these, and I can easily do it for WP typical pages and posts. However, my custom ...
1
vote
2answers
580 views

Loop with slider (slider not loading)

In my slider.php I have a loop that calls for a custom post type. That custom post type has a meta box for a slide url (link/title/etc). I can see the loop and everything else is working because in ...
-1
votes
2answers
22 views

Adding header logo instead of text

I want to add Header logo instead of the text "physics for All " in the following site. I think , i have to add my logo to my site then , i will have to insert the image link to the header.php ...
2
votes
2answers
954 views

Specific Loop For 2 <div> Within Each <li>

I need to create a loop that can logically be described as the following for a carousel: Requirements: 3 Loops 2 Posts Per Loop No Duplicates Order by Post Date Visual: < Start Loop #1 > ...
0
votes
1answer
26 views

How to change home or site url using action hooks or filter?

I want to change url dynamically, so is there any way to change url? I know other methods like from admin, directly from database or wp-config. but i want to change it from either hooks or filter. ...
0
votes
2answers
29 views

How to show a 'correct' message after submit a form?

I'm building a template page for submit a profile changes. I would like to show a 'correct' message in green(example) for the user knows. Here my template code: <?php global $avia_config; /** * ...
0
votes
0answers
20 views

Multiple Forms Email validation on a single page using javascript [closed]

I am developing a Wordpress Widget Plugin that inserts as many as you want email input forms in a widget. I am using the following code to validate email fields function validateForm(form) { var x ...
0
votes
0answers
8 views

How remove Wordpress Impression from my website [duplicate]

I am developing one wordpress theme for client. I completed the theme. But he is asking about remove the wordpress theme impression. Here impression means when i try to see view page source i am able ...
1
vote
0answers
21 views

How do I get around “Sorry, this file type is not permitted for security reasons”?

I was wondering how I could allow .tiff files to be uploaded in my wordpress site. I get the message "Sorry this file type is not permitted for security reasons". This question has been asked in ...
0
votes
2answers
28 views

How do I do so that people can register on my wordpress site?

I've been given a task by my teacher to do a "social network" for a game. To begin with, I want to make a custom theme where people at first have the opportunity to register and login. As I have ...
1
vote
1answer
13 views

Proper syntax or method for keeping url in modified isotope / category links

I'm setting up a project gallery using isotope jquery plugin for layout and filterability. I've seen examples of how to add a list of category links and modify them to filter on click, but... I want ...
1
vote
5answers
816 views

How to trigger $_GET request within admin plugin page?

I have this form in my plugin function: <form method="get" action="" enctype="multipart/form-data"> <p class="submit"> <input type="hidden" name="do_it_hidden" value="run"> ...
0
votes
1answer
38 views

How to check if woocommerce is activated in theme

I'm creating a theme with woocommerce which has the following: <ul> <li> <?php if ( is_user_logged_in() ) { ?> <a href="<?php echo ...