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

learn more… | top users | synonyms (1)

1
vote
1answer
47 views

I think emoji are killing my WordPress site… How can I debug?

I have had a rather frustrating last couple of days… after quite a bit of trial and error, I have come to the suspicion that emoji are killing my WordPress installation. Specifically, emoji in the ...
0
votes
1answer
27 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
0answers
59 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
170 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
79 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
149 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
27 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 ...
2
votes
2answers
147 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
39 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
46 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
104 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 ...
0
votes
1answer
30 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
81 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
34 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
49 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
66 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
52 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
38 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 ...
0
votes
0answers
23 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
31 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
58 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
45 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 ...
0
votes
0answers
131 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
13 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
0answers
64 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
17 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
32 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
41 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
91 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
14 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
38 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
39 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
44 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 ...
0
votes
2answers
85 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
62 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 ...
0
votes
1answer
27 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 ...
0
votes
0answers
22 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"> ...
0
votes
1answer
54 views

Generate responsive post thumbnails of same size

I am using a function to display related posts in my wordpress theme with their thumbnail. I am using uikit to make my theme responsive. Uikit offers a grid feature similar to the bootstrap one, and ...
3
votes
2answers
189 views

Why declare $post globally?

I'm new to Wordpress development and am seeing examples everywhere that have a line to declare the $post variable explicitly via: global $post; But I've tested my uses without that line and it ...
0
votes
0answers
32 views

Displaying Custom Post Type on Page with Same Title

I'm building a sports blog. I have a custom post type called conference. Each conference post contains HTML that is displays the team logos horizontally on my team custom posts as shown in the ...
1
vote
1answer
33 views

Is it acceptable to treat a filter like an action?

The wp_insert_attachment_data filter is available inside wp_insert_attachment(). It allows attachment post data to be filtered before it is updated in or added to the database. $data = apply_filters( ...
0
votes
1answer
1k views

Cannot modify header information - server cache

I have a wordpress website hosted on Lightspeed server. There's an error message displaying in admin login page and I can't access wordpress backend. This is the error Warning: Cannot modify ...
0
votes
1answer
80 views

Flexslider won't work on Wordpress

Hi guys I recently created a custom post type for flexslider on my Wordpress theme. However upon testing it got some issues. The slider is showing up but the images wont show up on it. There are two ...
0
votes
2answers
121 views

Building a plugin into a theme

Firstly, I know this is 'bad' practice for several different reasons, but for reasons that I won't waste your time with it's something I need to do. Using a fairly simple plugin and I've tried ...
0
votes
1answer
34 views

Why isn't my link attribute getting my css?

<link rel="stylesheet" type="text/css" href="style.css" /> That is the line I am using. The style.css file is in the same directory as the file I am running that from. Tt specifically just ...
0
votes
1answer
22 views

How to map my php files as the files for pages

How do I map my php files (like a file that is supposed to be the page "blog" and it contains all the html and php) to the actual page the html is supposed to be marking up many thanks note: I would ...
0
votes
1answer
45 views

Changed URl in General Settings now Wordpress site doesnt work

My website URL was www.example.com/singer I decided to get rid of "/singer" in the dashboard and ever since i have met with this error. Fatal error: Call to undefined function wp() in ...
1
vote
2answers
46 views

How to use an associative array in post__in with WP_Query?

I have stored user favorite posts in the user_meta table of WordPress. The data is stored in a format, for example a:1:{s:8:"post-134";s:3:"134";s:8:"post-136";s:3:"136";}. How can I get this in the ...
0
votes
1answer
32 views

No Authors for custom post type

I am trying to implement custom post type in Wordpress. plugin: Advanced Custom Fields register_post_type('acf', array( 'labels' => $labels, 'public' => false, ...
0
votes
1answer
37 views

Why the dynamic_sidebar() call is putted into an ul tag?

I am pretty new in WordPress development and I have the following doubt about how the sidebar are putted into a WordPress theme. Looking into the official documentation: ...