wordpress

ACF, WordPress – Working With Multiple Post Objects to Get Content out on the page

I’ll try and explain this one the best I can. I am currently working on an MMA website where I am trying to display a fight card on an events page. The event page is a custom post type with its own custom fields and also Fighters and Sponsors are their own custom post types containing their own custom fields….
Read more

share mysql database for multiple websites

We have a few websites that need to output the same data, thus share the same photos and descriptions, to save time and prevent typo errors during an update. Our main website is wordpress customized and the sister sites are, http://miryabluecruise.com http://deluxecabincharter.com http://miryaguletcharters.com As we could not locate a selection in the wordpress panel, how can we merge the single…
Read more

301 all posts to their attached PDF (WordPress)

I’m looking to 301 Redirect all posts to a PDF that is attached to the Post. This could be by allowing the Featured Image to be a PDF, then referencing that (not sure how this would be accomplished). Right now I’m using WP Attachments (https://wordpress.org/plugins/wp-attachments/) – so ideally, it would do this: If PDF exists in the Post (via WP…
Read more

facebook access token: is there a risk to give my key and secret to a 3rd party website?

I want to use a plugin on my wordpress site (apparently with a good reputation) to display a facebook like box. In the settings they recommend that I create an access token instead of using the plugin’s token (which is logical, and I perfectly understand the reasons to do so) but in order to generate that token, they ask me…
Read more

Upload an Image in my own WordPress Plugin’s folder?

I am just making my own plugin in wordpress.I have put some different form fields like Name,Email,Phone number etc.All the functionality is working properly. Now I want to add one field i.e User can Upload there Image.For eg profile pic etc. I can create a seperate folder name “uploads”.This folder is exist in my own plugin’s folder. Simply I want…
Read more

WordPress Timber – get data from Class and add to pots template

I’m using Timber for WordPress and i have a Class extends by TimberPost, where queried speficic custom postmeta values (acf). Now, i want send the data to the post template as custom array. my class look like this: class CustomPostMeta extends TimberPost { var $_postmeta; public function postmeta() { /*called query from other Class CustomPostMeta * * $meta_query – speficic…
Read more

How to add count to array?

I have a counter in a while loop and I want to add every value of that count in an array? Is it possible? What I tried: $title_count = 0; if(have_posts()){ while(have_posts()){ $title_count++; the_post(); $max_array = array(); $add_to_array = array_push($max_array, $title_count); } } Source: wordpress

WordPress Jetpack infinite scroll custom query

I have a WordPress page which uses infinite scrolling from Jetpack. In the category-news.php template I have set a custom query. This is: query_posts( array( ‘posts_per_page’ => 2, ‘category_name’ => ‘news’, ‘meta_query’ => array(array( ‘key’ => ‘gallery_images’, ‘compare’ => ‘!=’, ‘value’ => ” ) ) When I open the page, the query works great. But when I click the ‘Load…
Read more

Local host WordPress theme are broken due to port issue

I’m using ‘MAMP for windows’ to install and develop wordPress in my Local Windows 10 machine. The port which my Apache is listening to is localhost:8888. I’m successfully able to install WordPress in my local machine and login to my dashboard. As you can observe from the below 3 screenshot. All my theme images and CSS are broken. The reason…
Read more