Link to page with posts of specific type

First, never use query_posts, use WP_Query to create additional queries. When you register your post type, set has_archive to true, or a string which will be the URL slug for your post type archive. You can then use get_post_type_archive_link() to output the URL to your post type archive. <a href=”https://wordpress.stackexchange.com/questions/210453/<?php echo get_post_type_archive_link(“issues’ ); ?>”><li>View All</li></a>

Adding html banner to posts

rss_use_excerpt is the option people can use to change the blog from Full Text to Summary. With a combination of is_front_page and that setting you can determine if you’re blog page is showing the summary — in your case — when you don’t want to show the banner on the blog page. function display_banner($content) { … Read more

Wierd site output [closed]

This looks like a hack, probably in W3TC. Try disabling all the Plugins one by one, and if it doesn’t go away, try switching to the default theme. If that did not work, install WordPress from scratch, and transfer the database to it. If you prefer another debug mode, I suppose your script gets hooked … Read more

Initial offset of number of posts in home page on the posts page

One way might be to set posts_per_page for the query to 13 and then override the $paged global (before the query is called) to force it to 2 if it is only 1… eg. if ( (is_post_type_archive(‘post’)) { global $paged; if ( ($paged == 0) || ($paged == 1) ) {$paged = 2;} }

Https and Http for iFrame

Because your server is HTTPS, the only way you can accomplish this is rendering the content on your server or getting the 3rd party to upgrade their server content to HTTPS. It’s just the rule of the Internet. To fix the mixed content issue, pull all the JS and HTML you need into your own … Read more

Remove   in post content

As per comments on the original post, it appears this is as a result of copying text from another source. Unfortunately, copying and pasting can bring across whatever junk the source editor decides to include. MS Word has typically been terrible at this; WordPress now does a pretty good job at cleaning it up but … Read more

How can I use custom menus with a Bootstrap WordPress theme?

You can change the classes of the <ul> by adding ‘menu_class’=>’nav navbar-nav’ to your $args array. Remember, this parameter overwrites all the classes, so add “menu” as well if you want many themes and plugins to work! If you don’t want the outer <div>, you can “unwrap” the <ul> by adding ‘container’=>false. $args = array( … Read more

File Uploader – Upload without adding to Media Library

HTML Okay, you’ll of course want to set up an HTML file. I would use this code or something like it: <form action=”upload.php” method=”post” enctype=”multipart/form-data”> Select image to upload: <input type=”file” name=”fileToUpload” id=”fileToUpload”> <input type=”submit” value=”Upload Image” name=”submit”> </form> Of course, you don’t have to use upload.php as your filename, that’s just what w3schools used. … Read more

Calling PHP Titles inside Javascript Markup

First, don’t echo your php, but assemble everything in a string, let’s say $titlestring. Next, make this string available for access by the javascript (the slug is the one you used to register the script): $params = array ( ‘titlestring’ => $titlestring, ); wp_localize_script (‘your-script-slug’, ‘IframeTitle’, $params); Finally, access the variable in the script: ‘<div … Read more

Need help removing […] after excerpt

This has to work, Im using it in several projects: add_filter( ‘excerpt_more’, ‘my_excerpt_more’ ); function my_excerpt_more( $more ) { return ”; } Just copy-paste it to your functions.php. Little bonus snippet that you might need: add_filter( ‘excerpt_length’, ‘my_excerpt_length’ ); function my_excerpt_length( $length ) { return 50; } This means that excerpt is 50 words long. … Read more