Changing title bar in browser window of theme “Encounters Lite”

Filter wp_title, get the current page title from your external app, and return that title. Sample code: add_filter( ‘wp_title’, function( $title ) { // check if it the correct page if ( ! is_my_external_app_page() ) return $title; return get_title_from_external_app(); }); The implementation details are up to you.

Add wp-link-pages to post

I am answering my own question. Here is the javascript that I wrote which works 100% smooth. <script> $(document).on(“scroll mousedown DOMMouseScroll mousewheel keydown”, function (e) { if (e.which > 0 || e.type === “mousedown” || e.type === “mousewheel”) { $(‘html,body’).stop(); } }); pageSize = 1; showPage = function(page) { $(“.comix”).hide(); $(“.comix”).each(function(n) { if (n >= … Read more

Child Pages and Custom Taxonomies

You can grab the ID’s of all children and set the post__in argument for your tax query: $child_ids = $wpdb->get_col( “SELECT ID FROM $wpdb->posts WHERE post_parent = $post->ID AND post_type=”page” ORDER BY menu_order” ); $args = array( ‘post__in’ => $child_ids, // Only retrieve taxonomy posts that are children of this page ‘tax_query’ => array( array( … Read more

Add role and edit page capabilities

The edit_pages capability only allows a user to edit his own unpublished pages. It does neither allow to edit others pages (this would require the edit_others_pages capability) nor does it allow to publish or edit published pages (capabilities: publish_pages and edit_published_pages). I’d strongly recommend having a look on this wonderful table: https://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table listing up all … Read more

the_content() Returns post content when I want page content

When you configure your blog (posts) page under Settings > Reading, that page becomes nothing more than a placeholder – in other words, you won’t be able to grab it’s title/content within index.php without a little trickery: if ( $page_id = get_option( ‘page_for_posts’ ) ) { echo get_the_title( $page_id ); // the_content() doesn’t accept a … Read more

How to tell which Plugin is displaying?

It can be less than trivial to match output to a source code responsible in WordPress. The typical cases are following: The output is produced by template file directly. The locating template responsible is often about just searching for full or partial text match. From the other side template files can be identified among all … Read more

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