Tag Info

New answers tagged

1

You can get the list of other posts with same post parent by running a custom query. You should supply parent post id in post_parent parameter to WP_Query and exclude current post from custom query. So this will be the custom query. $parentpost = wp_get_post_parent_id( $post->ID ); if ( $parentpost && $parentpost != '0' ) { $currentpost = ...


0

Your problem is that you are putting the page result in $page. While the normal commands like the_title() and get_field() will look for the $post variable if you are not setting a seperate ID of which you want the title. I once did this by creating a backup of the $post variable, and then just put each post i wanted to include on the parent page in the ...


0

I believe that it will be hard for you to accomplish that without some javascript because you are adding the link manually. However, you can achieve the same thing in another way: Most wordpress themes come with a body_class() function in the <body> tag. That function adds several classes to the body tag that allows you to better target your content ...


-1

Have a look at this article by Michael Martin. I wanted to implement an "infinite scroll" on my site and he explained exactly what to do and how to do it. Maybe it will help you, who knows... It can be changed to load pages instead from a function.


2

Previous Question That answer I've linked to shows the steps you'll need to take. It probably didn't come up in your searches as you weren't using the right terms. As you're a front-end dev, this is how I'd do it based on that persons advice. Don't load anything in the template. Just have an empty ul with an id you can target, and a button to use for the ...


0

No, unfortunately this is inherent limitation of PHP templates used in WordPress natively. You will have to override either this template file, or file(s) which include it, but in any case something will have to be replaced on whole file scope. There is no clean way to load template file partially in WordPress, which is handled by template inheritance ...


0

<?php global $post; if ( is_page('home') || is_page('services') ) { ?> <div class="col-md-2 col-sm-4"> <?php ci_e_logo('<h1 class="logo ' . get_logo_class() . '">', '</h1>'); ?> </div> <?php } elseif ( preg_match( '#^service(/.+)?$#', $wp->request ) ) { ?> <div class="col-md-2 ...



Top 50 recent answers are included