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

learn more… | top users | synonyms (1)

0
votes
0answers
10 views

Function not pulling image or text from custom post type

//Custom Post Type register_post_type('inf_main_feature', array( 'labels' => array( 'name' => 'Main Featured', 'singular_name' => 'Main Featured', ...
0
votes
1answer
21 views

Display data on same page as form without refresh

I am not sure if there is something about wordpress, or what I am doing, but I can not get online tutorials to work when implementing in a page template. For example this ...
0
votes
0answers
12 views

Add different classes and use different image size on every nth post in loop

I'm creating a new site for a client and they want to have a Masonry style layout for the homepage with 3 different image & width sizes. The default class is "medium-3 small-square" but what I ...
0
votes
2answers
45 views

How to display posts of specific category using a custom Query in WordPress?

Hi I want to display a specific category from a custom query in WordPress. My code works fine and it gets the latest 4 posts, but what I want now is to retrieve a specific category. My code is below ...
0
votes
2answers
20 views

Display title list of all post of current post type

I have a custom post type called press. I'm on the template single-press.php What I want to achieve is generate a list of the titles (with it's corresponding link to it) of all press custom post ...
0
votes
1answer
29 views

Multiple do_shortcode in page template

Is it possible to nest multiple shortcodes with do_shortcode? Using visual composer and easytable with the visual editor, the classic editor displays: [vc_row][vc_column ...
1
vote
0answers
22 views

wordpress archive a user

Please note this question was originally created in stack overflow. I have moved it here due to recommendation. I apologize if this can be answered elsewhere. I tried searching around with no ...
-1
votes
0answers
21 views

Remove All in One SEO Pack Widget while posting [on hold]

Im trying to remove or disable All in One SEO Pack Widget while posting for normal editors (not admins) with this code: <?php if (!current_user_can( 'manage_options' )) { function remove_aiosp() { ...
0
votes
1answer
72 views

Bash issue in Podcast Plugin? [on hold]

In one of my WordPress projects I have generated a podcast feed url through a plugin. When you look at the podcast feed url, there are a bunch of characters that seem to have been added to the end ...
-1
votes
0answers
8 views

Load a php file that contains an advance custom field gallery in a div without reload

I can't manage to load a php file that contains an advance custom field gallery in a div, without reload.. This is my php file <?php $images = get_field('gallery'); if ( $images ) : ?> ...
0
votes
0answers
10 views

jQuery - WooCommerce checkout radio button [on hold]

I would like to show different fields on my WooCommerce checkout, depending on the chosen shipping method. What I am looking for is a jQuery function that checks whether the radio button with id ...
2
votes
2answers
41 views

WP_User_Query order by meta_key that is an array

I have set a user metadata named achievements which is an array containing various numeric values. Using WP_User_Query, I want to order the list by a specific key within this array named points. The ...
1
vote
2answers
31 views

How Can I Call Up The Author's Name on a Post

For some reason my by author disappeared and I cant turn it back on. I know where I want to put it on single.php at the end of the post, but I can't figure out what code I have to put in for it to ...
0
votes
0answers
15 views

Show custom default avatar instead of gravatar

I'm using this custom function to get the default avatar from my server instead of gravatar: if(!function_exists('custom_avatar')){ function custom_avatar($avatar_defaults){ ...
0
votes
1answer
31 views

How To Make Connection To WordPress Data Base In A Plugin?

I am learning Plugins and I am trying to connect WordPress database wp-config.php in my Plugin PHP code. Currently for checking my code, I used the below connection and it is working fine. Now I ...
-1
votes
0answers
14 views

wordpress and IONCUBE issue [on hold]

i am using a premium theme in WordPress 4.0. but problem is when i tried to change function.php file, it return error "encoded function.php file is corrupted." all data in function.php file is ...
0
votes
1answer
23 views

If is page, archive or search output this code

Hi there I'm trying to make this code works for more than just home page but I'm getting errors while trying to accomplish it... can someone help me? I'm trying to use this: <?php if ...
0
votes
0answers
17 views

“imagejpeg” function is not working in wordpress

$image = imagecreatefromjpeg('http://localhost/test/wp-content/uploads/2014/09/city_81.jpg'); // choose a color for the ellipse $ellipseColor = imagecolorallocate($image, 0, 0, 255); // draw the ...
0
votes
2answers
22 views

wordpress.org disallowing my plugin becuase of loading core files in cron cpanel file

I made a plugin and trying to install on wordpress.org but Wordpress is giving me error message that ## Calling core loading files directly is incorrect. I am using a cron file in my plugin.This cron ...
0
votes
1answer
22 views

Using 'mysqli_connect' 'crashes' Wordpress client-side

I am using Wordpress as a CMS for a bus-route planner, I have inputted the first few bus stops for the first bus route and am now developing a PHP script for the planner. I am using this code, with a ...
0
votes
0answers
10 views

Getting Post Thumbnail from RSS feed with SimplePie

I am trying to pull the post thumbnail from an RSS feed to output on an external site. I am using the following function to add the post thumbnail to the site: function rss_post_thumbnail($content) { ...
0
votes
1answer
31 views

get image url inside the content in wordpress?

I want to get the image_url from the content.Actually i have done the following code to get the content: $content=$query_val->post_content; i'm getting following as o/p: "content":"Lorem ...
0
votes
1answer
28 views

apply_filters() function

I have used apply_filters() while retrieving the content from WordPress post like: $content=$query_val->post_content; $content = apply_filters( 'the_content', $content ); When I was using ...
-1
votes
1answer
19 views

How to add image/logo to this Wordpress theme? [closed]

So the Wordpress theme i'm using is Moesia. You can find a demo of it here- http://demo.athemes.com/moesia/ But the thing is they don't have an option to add an image on the first section (welcome ...
0
votes
0answers
22 views

stuck in $args value insertion how to pass more than one value

I am in a middle of building a plugin and some how I manage to limit profiles to show only with the users with role regular_user by putting this line in my code $args['role']='regular_user'; ...
0
votes
0answers
20 views

Color Picker - Manipulate CSS

So i've been able to hook everything up to my theme options, the color picker now works and correctly manipulates certain piece of CSS, so that is all working. What i'm asking now is if there is a ...
1
vote
1answer
33 views

Using shipped version of jquery

Thare are no errors in the JS console. My goal is to use the shipped version of jQuery that Wordpress uses to work with bxslider. According the link shown here, the current version of jquery shipped ...
0
votes
1answer
38 views

Shortcodes (with a space) added to php Sample

I have found only a small handful of posts from around the internet regarding Shortcodes and allowing them to work / execute within Admin Pages. So, I have made several admin pages in Wordpress, and ...
-2
votes
0answers
34 views

How to prevent sql-injections for non-specialist in PHP [closed]

As I know sometimes some Themes or Plugins for WordPress can content "bad code" and probably site can be hacked via SQL injection. And I want ask If I change in wp-config.php file database prefix to ...
0
votes
0answers
23 views

$wpdb->get_results(…) returns empty array despite correct query

As title implies, I cannot seem to get $wpdb->get_results to give results. Running the "raw" query is successful, but this seems to be failing for some strange unknown reason. global $wpdb; ...
0
votes
0answers
43 views

Single Post with modal window

I read some threads here but i can't find the right answer. I'm using bootstrap, and i've this code inside of the archive.php: <div id="myModal1" class="modal fade" tabindex="-1"> <div ...
0
votes
0answers
7 views

Validate email, if field has characters

I am building a small form on my website where I want users to be able to send me a message and have the option to include their email in an email input. It's fairly simple: ...
0
votes
1answer
32 views

php Code return blank page

I am testing some code for a local wordpress site and am editing the theme's functions.php file. As i was writing the below code, it just return a blank site. Anyone can enlighten me? i tried turning ...
0
votes
0answers
32 views

PHP switch and AJAX display WordPress post

I have a world map on a WordPress page. I'd like to load a particular post onto the page depending on what region of the map is clicked. I'm writing this as a plugin for my site. Here is what I have ...
0
votes
0answers
7 views

Getting attachments to a post to show in the order they are in the WYSIWYG editor

I am trying to get the images that are inserted into my gallery to show in the actual order that they are showing in the WYSIWYG editor. My code looks like this: <?php $args = array( ...
0
votes
1answer
20 views

How to save information related to post in database?

I created a post-to-email plugin and I need to save something in the database when the post is sent so I don't allow users to send it twice. How do I save this in the database? And how can I retrieve ...
0
votes
0answers
14 views

How to disable auto friend requests when register buddypress? [closed]

When a new member register in buddypress, He found some request on friend->request tab. How do members get such request without others sending it? Can I disable this? Please help.
0
votes
0answers
22 views

Custom call to action

I am trying to develop a simple call-to-action for our marketing group. They want white papers and other information to download once someone has entered their email. My question is, is my code ...
0
votes
0answers
49 views

Add input fields to Wordpress search to search custom fields

I have 2 custom fields: first and last. My goal is to add 2 new input fields (first and last) to search their respectable custom field. Here's my form code in searchform.php: <form role="search" ...
0
votes
0answers
12 views

Create subscriber account using e-junkie send generated code

Trying to use e-junkie's send generated code feature to automatically create a subscriber wordpress account for new customers. The code needs to take their information that is passed through after ...
0
votes
0answers
8 views

Redirect all users to previous URL before login, except “contributors”

In one hand I redirect all users to previous URL before login. This is the code: function login_redirect( $redirect_to, $request, $user ){ if(isset($_REQUEST['redirect_to'])){ return ...
0
votes
2answers
22 views

Child Theme's Read More Text

I'm sitting here trying to figure out how to change the Read More text. I'm currently creating a Child Theme of Oxygen and as far as I can tell, they don't have a function to easily change it. I want ...
0
votes
1answer
25 views

How to define Og Meta Tags in header using conditions [duplicate]

I'm trying to configure my Facebook Og meta tags in my header so I get a different result on the type of page I want. I've been hitting some road block that searching through google haven't been able ...
-1
votes
0answers
21 views

Why wordpress plugin shortcode doesn't work properly with IE [migrated]

I recently working on a wordpress, plugin, it already reached a final stage, and all it left is cross browser compatibility, the problem is why shortcode doesnt work properly With IE. Below are My ...
0
votes
2answers
65 views

Count Title and Post Characters

I need to get a total count of characters for post titles and post text characters. Are there any build-in WordPress functions available for that? My posts are paginated so the numbers for post text ...
0
votes
2answers
46 views

PHP Script for last login time

I've got this script to update a table in my database with the logout time of a user, then when they log in next time, this data is shown in the form of "Last login: date time". However this isnt ...
-2
votes
0answers
22 views

Unicode conversion in sql database

I am inserting the post titles and post body in UNICODE, but i dont want to save in unicode UTF8 characters. Instead, i want to use my title and text body convert function automatically and display ...
0
votes
1answer
24 views

Use page.php for front page

For some reason even when I am selecting a static page for my homepage it is still choosing to load the index.php file. I would really appreciate your help on this as I would like it to load my own ...
-1
votes
0answers
18 views

Modify Header file of Optimizepress [ op_theme_file('header') ] [closed]

I have tried to edit the default header of Optimizepress, I have edited the blog header, but it seems I can't edit the default page header. On header.php its written <?php op_theme_file('header') ...
0
votes
0answers
10 views

comment_post and preprocess_comment connected

In my comment_form arguments i add a input label with a value: 'comment_notes_after' => '<div id="canvasDiv" ></div> <script type="text/javascript"> ...