Multiple editable content on page

you can’t pass nothing inside the_content(); except a “read more”. To achieve what you need it could be done this way; <?php get_header(); ?> // getting the header <?php if (have_posts()) : while (have_posts()) : the_post(); ?> // the loop stuff <?php // PAGE 1 $page_id = 8454; // id of the page you need … Read more

Trying to fix multiple category drop down

The HTML seems correct, as Price dropdown contains the right cat ID. I guess this is a JS problem, my first guess is that you shouldn’t use the same variable name in both scripts. Replace dropdown by dropdown_price for second one, like : <!–DROPDOWN SORT CATEGORY 2–> <script type=”text/javascript”> var dropdown_price = document.getElementById(“cat2”); function onCatPriceChange() … Read more

Arrange Category post manually when displayed

So, if I can clearly get you, you want to sort the order of your posts. I found the following plugin best fit for the purpose: Post Type Order – WordPress Plugin After installing the plugin, you will get a new submenu under “Posts” (and under all other Custom Post Types). You can order the … Read more

Combining fancybox with multiple thumbnail plugin

I managed to get the result on my own after much playing with the codes. Here is the working code 🙂 <div class=”collections_dresses_container”> <?php query_posts(‘posts_per_page=-1&cat=10’); if(have_posts()) : while(have_posts()) :the_post(); ?> <div class=”collections_thumbnails”> <?php $imgID = get_post_thumbnail_id(); $url = MultiPostThumbnails::get_post_thumbnail_url(get_post_type(), ‘secondary-image’); ?> <?php if ( has_post_thumbnail()) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), ‘large’); echo ‘<a class=”fancybox” href=”‘ … Read more

Migrate php folder to WordPress

I assume that each php file contains the content of a page. It depends a lot on how your content is written in that php page, you should make another php script, go trough all files in that directory. <?php if ($handle = opendir(‘/path/to/files’)) { echo “Directory handle: $handle\n”; echo “Entries:\n”; /* This is the … Read more

Changable favicon

If you have a modern theme, where you can upload a favicon with the theme customizer (rather than a hardcoded url in the header.php), you can simply use a filter. Take a look at the function get_site_icon. As you can see it returns the url of the image that you have uploaded using the customizer. … Read more

How to use filters/params in wordpress as headless cms api

ACF adds post meta, so, you will need to modify the query using the pre_get_posts action. Specifically, you’ll need to get the city name from the $_GET params and modify the query adding something like the examples in the pre_get_posts documentation. Essentially, something like this: add_action( ‘pre_get_posts’, function(&$query) { if( is_main_query() && ” != $_GET[‘city’] … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)