Questions tagged [parse]

The tag has no usage guidance.

1
vote
1answer
81 views

Using Gutenberg parse_blocks Function With ACF Custom Blocks?

I am trying to separate Custom ACF Gutenberg Blocks from the rest of the core blocks on a post. Currently I am using the_content(); This is grabbing every block in the Gutenberg Editor. What I want to ...
0
votes
0answers
31 views

How to parse any content which was added after the working out filter 'the_content'

How to parse any content which was added after the working out filter 'the_content'? For example I have html structure of the simple page that i was created via Worpdress Admin Dashboard -> Pages -> ...
0
votes
0answers
49 views

How can I use an image from an external source without uploading it to the media library

I am looking for a way to tweak my xml parser code to insert a url from an external source into a new post, instead of first uploading it to the website's media library and than adding the attachment. ...
1
vote
1answer
1k views

Extract subdomain and relative address from a url

I am writing a plugin where I need to split a URL submitted to a form into all the component parts of the URL including subdomain, extension etc. In addition, I need to construct the relative address ...
-1
votes
1answer
73 views

Parse error: syntax error, unexpected '$q74ed' (T_VARIABLE)

I'm not a programmer, but now I have a problem with my Wordpress-Site, which I can't figure by my self. I have a white screen and can't look into my wordpress-site. After I activated the Debug-Mode, ...
0
votes
1answer
23 views

Fonts are parsed in one way but rendered in a different way

Nginx 1.10.3, WordPress 4.9.1, Elementor 1.8.11. A subdomain site. The problem Global fonts appear fine inside Elementor view but not outside of it. That is to say: When you click "Edit this page ...
1
vote
4answers
2k views

How to remove “http://” When Echoing URL?

I'm seeking to echo the domain name (url) without the 'http://' (or 'https://'). I've created the following: <?php $surl = bloginfo('url'); $findh = array( 'http://' ); $replace = ''; $outputh = ...
0
votes
1answer
293 views

Parse query filter in wordpress and relation

I am having this code in filter backend.Three filters are there. Each are working separate good. but when i run all filter same time its returning "OR" result. I need to make all three filters "AND" ...
0
votes
1answer
19 views

How to prevent someone from entering strings without making it available for translation?

I am working to make all strings in my plugin ready for translation by putting them under __() or _e() as per requirement. Now in future to avoid others in my team to add strings without making ...
0
votes
1answer
290 views

How can I extract or parse data from post contents' shortcodes into an array?

I'm migrating from one Visual Page editor to another. I'm extracting the texts surrounded by the shortcode opening and closing tags. Before I write my own parsing script, I wanted to make sure that ...
0
votes
2answers
285 views

Parse error: syntax error, unexpected ''tax_query'' in wordpress

hi i want to display posts by term. first the code display all the posts: $aProjectArgs = array( 'post_type' => 'uni_project', 'posts_per_page' => -1, '...
0
votes
1answer
21 views

PHP tag in post content makes wordpress go crazy

I am trying to insert PHP code in post content, but I've just realized that it brokes Wordpress or maybe some plugin. As for example avoid any specific class naming structure or style. <?php ...
1
vote
1answer
39 views

Parse error after modifying the template menu [closed]

I made an edit in the template's functions.php and now I can't access my website. I know I have to fix the problem from the Cpanel but I'm now scared to do anything because I've tried once and the ...
2
votes
1answer
112 views

Check what is at URI (post, archive, etc…)

Is there a way or function where you can pass in a custom uri like uri-part/uri-part2 and we can check what is under this address? I want to check if a uri hosts a post, page, archive, category, ...
0
votes
1answer
641 views

Page template gives 'Parse error: syntax error' when used, but no error found!

I get this message, whenever I activate this page template for one page, for instance about.php : Parse error: syntax error, unexpected end of file in /home/u425744603/public_html/wp-content/themes/...
1
vote
2answers
2k views

How to use WordPress (PHP) functions in AngularJS partials files?

I am using AngularJS to load a list of my WordPress posts, however I can not get any of my PHP functions to work with my partials file. I've tried using something such as search.php instead of ...
1
vote
1answer
4k views

How to parse wordpress options json

I have the data saved using a plugin in this format: a:7:{s:6:'Sunday ';a:3:{s:6:'active ';s:3:'yes ';s:5:'start ';s:5:'08: 00 ';s:3:'end ';s:5:'13: 00 ';} s:6:'Monday ';a:3:{s:6:'active ';s:3:'...
0
votes
1answer
60 views

How woo-commerce store Product Data value in DB?

I am working on a project in which Products are being added by parsing a XML file. For Variant product I am able to save all attributes and the product variant related to a product , but I am unable ...
4
votes
1answer
495 views

Correct regex for wp_embed_register_handler

THE GOAL I'm trying to parse a url and convert it to an embedded video player in my post's content but I think my regEx is off or I'm not creating a provider correctly. THE CODE Here is what I have ...
-1
votes
1answer
2k views

Parse error: syntax error, unexpected T_FUNCTION

I just moved my site from one server to another, both on bluehost But i am getting this error Parse error: syntax error, unexpected T_FUNCTION in /home2/energzk2/public_html/wp-content/themes/...
0
votes
1answer
122 views

Custom Post Type Field Array parsing [closed]

I have a CPT Field named 'course_location' as a checkbox with values. When I use $field = get_field_object('course_location'); '<pre>searchDateArray'; print_r($field); echo '</pre>'; ...
0
votes
0answers
89 views

What method does this eventually call: do_action_ref_array( 'parse_query', array( &$this ) );

I'm looking at this line of code at the end of public function parse_query in query.php: do_action_ref_array( 'parse_query', array( &$this ) ); Does this simply end up calling the parse_query ...
0
votes
1answer
32 views

getting a blank login page :( any way I can fix this without having to do a clean install?

here's the site: www.evolvtec.golocalexpert.com Parse error: syntax error, unexpected '}' in /home2/inbrazil/public_html/evolvtec/wp-content/themes/Divi/epanel/custom_functions.php on line 1264 ...
0
votes
1answer
330 views

Upgrading to 4.1 fixed parse error

In the past few days I've had reports that users weren't able to access my site. They were just getting a blank page. I checked the error_log and found this. [22-Nov-2014 22:07:41 UTC] PHP Parse ...
0
votes
1answer
75 views

Worpress url parse

I want to display posts in certain category only with given tag. Problem with parsing url slugs. For example, I have category named 'Clothes': example.com/clothes/ I can get posts in this category ...
0
votes
2answers
390 views

post__in - Placing content from a foreach loop inside of an array

I know this code is incorrect, but it's a basis of what I am trying to achieve. I am parsing an xml feed via PHP and running a foreach loop to get a value from a specific key. Here is the snippet I ...
-1
votes
1answer
2k views

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' [closed]

I am trying to use following codes to have an email share button in a WordPress website. But adding this codes in single.php shows "Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' ...
0
votes
0answers
179 views

syntax error unexpected '}' at 364 line

I am getting this error on my website and am not able to access admin dashboard. The error occurs when I am a new theme on my website. Can you please help me to find this error. Parse error: syntax ...
0
votes
1answer
454 views

Does Wordpress has an automatic link parse function?

Does wordpress has an automatic link parse function? I want the HTML to be generated automatically when writing www.url.com -> <a href="www.url.com">www.url.com</a>
0
votes
1answer
100 views

How to import individual blog posts into Wordpress?

I'm trying to move some content from another website into blog posts for work, and I need a little bit of help. Basically my task is to parse a bunch of files into their content, put them into a ...
1
vote
1answer
2k views

Get parse_query filter to return slug instead of id

After much headache in the last week I feel like my problem is almost solved. I have been attempting to customize the admin edit.php page of custom post types to display and sort/filter custom ...
0
votes
1answer
54 views

Function code problem

I changed my taxonomy slug from singular to plural ("state" to states"). Ever since then my taxonomy has been broken. It used to say OTHER instead of the state name. Now my urls look like this Domain....
0
votes
3answers
22k views

Printing out JSON array returned [closed]

I have the following JSON array: [{"occurences":"1","post_title":"Test 1","ID":"16"}, {"occurences":"1","post_title":"Test 2","ID":"19"}, {"occurences":"1","post_title":"\u543b\u60a8\u7684\...
1
vote
2answers
1k views

Get closest page ID from URL

Lets say on my WordPress website I navigate to: www.example.com/media-centre/news/17/an-example-news-post In this case I am looking at a post in a CPT called News. What I want to do is get the ...
0
votes
1answer
2k views

Problems with functions.php! Error! [closed]

Suddenly I got the message: Parse error: syntax error, unexpected T_CLASS in /home/spandabe/public_html/wp-content/themes/modularity-lite/functions.php on line 72 when opening my site www....
-1
votes
1answer
493 views

How to handle PHP parse errors?

I tried to execute the following code and I got a parsing error message (line:3). Here is the code on Pastebin http://pastebin.com/gC7rsJqw. I tried echoing but didn't seem to solve the problem. ...
0
votes
2answers
314 views

How to make modifications only to certain elements of an HTML string on the server-side?

Is there a similar way to select / perform DOM manipulation on the server-side (PHP) like the way jQuery works? For example, if I wanted to modify content of each <pre class="raw">...</pre&...