<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kerem ER</title>
	<atom:link href="https://kkerem.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://kkerem.com</link>
	<description>Web Geliştiricisi</description>
	<lastBuildDate>Tue, 11 Nov 2025 02:26:03 +0000</lastBuildDate>
	<language>tr-TR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://kkerem.com/wp-content/uploads/favicon-1-150x150.png</url>
	<title>Kerem ER</title>
	<link>https://kkerem.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to change URL query parameter with Javascript</title>
		<link>https://kkerem.com/how-to-change-url-query-parameter-with-javascript/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 22 Oct 2022 15:51:02 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JavaScript]]></category>
		<guid isPermaLink="false">http://localhost/kerem/?p=187</guid>

					<description><![CDATA[URL query parameters can be easily modified using URLSearchParams and History interfaces: // Construct URLSearchParams object instance from current URL querystring. var queryParams = new URLSearchParams(window.location.search); Set new or modify existing parameter value. queryParams.set("myParam", "myValue"); // Replace current querystring with the new one. history.replaceState(null, null, "?"+queryParams.toString()); Alternatively instead of modifying current history entry using replaceState() we can use pushState() method to create a [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>URL query parameters can be easily modified using <a href="https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams">URLSearchParams</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">History</a> interfaces:</p>
<pre><code class="language-javascript hljs"><span class="hljs-comment">// Construct URLSearchParams object instance from current URL querystring.</span>
<span class="hljs-keyword">var</span> queryParams = <span class="hljs-keyword">new</span> <span class="hljs-title class_">URLSearchParams</span>(<span class="hljs-variable language_">window</span>.<span class="hljs-property">location</span>.<span class="hljs-property">search</span>);
<span class="hljs-title class_">Set</span> <span class="hljs-keyword">new</span> or modify existing parameter value. queryParams.<span class="hljs-title function_">set</span>(<span class="hljs-string">"myParam"</span>, <span class="hljs-string">"myValue"</span>);
<span class="hljs-comment">// Replace current querystring with the new one.</span>
history.<span class="hljs-title function_">replaceState</span>(<span class="hljs-literal">null</span>, <span class="hljs-literal">null</span>, <span class="hljs-string">"?"</span>+queryParams.<span class="hljs-title function_">toString</span>());</code></pre>
<p>Alternatively instead of modifying current history entry using <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API#The_replaceState()_method">replaceState()</a> we can use <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API#The_pushState()_method">pushState()</a> method to create a new one:</p>
<pre><code class="language-javascript hljs">history.<span class="hljs-title function_">pushState</span>(<span class="hljs-literal">null</span>, <span class="hljs-literal">null</span>, <span class="hljs-string">"?"</span>+queryParams.<span class="hljs-title function_">toString</span>());</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WordPress Code List</title>
		<link>https://kkerem.com/wordpress-code-list/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 28 Mar 2022 23:34:45 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://localhost/kerem/?p=185</guid>

					<description><![CDATA[I collected the parameters I used while creating a WordPress theme on one page. This content contains codes suitable for general use and includes all the necessary general codes when creating a theme. To help others as a WordPress lover… Title parameter &#60;?php global $page, $paged; bloginfo( 'name' ); wp_title( '»', true, 'left' ); $site_description [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I collected the parameters I used while creating a WordPress theme on one page. This content contains codes suitable for general use and includes all the necessary general codes when creating a theme. To help others as a WordPress lover…</p>
<p><b class="small mt-3 d-block">Title parameter</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span>
    <span class="hljs-keyword">global</span> <span class="hljs-variable">$page</span>, <span class="hljs-variable">$paged</span>;
    <span class="hljs-title function_ invoke__">bloginfo</span>( <span class="hljs-string">'name'</span> );
    <span class="hljs-title function_ invoke__">wp_title</span>( <span class="hljs-string">'»'</span>, <span class="hljs-literal">true</span>, <span class="hljs-string">'left'</span> );
    <span class="hljs-variable">$site_description</span> = <span class="hljs-title function_ invoke__">get_bloginfo</span>( <span class="hljs-string">'description'</span>, <span class="hljs-string">'display'</span> );
    <span class="hljs-keyword">if</span> ( <span class="hljs-variable">$site_description</span> &amp;&amp; ( <span class="hljs-title function_ invoke__">is_home</span>() || <span class="hljs-title function_ invoke__">is_front_page</span>() ) )
        <span class="hljs-keyword">echo</span> <span class="hljs-string">" » <span class="hljs-subst">$site_description</span>"</span>;
    <span class="hljs-keyword">if</span> ( <span class="hljs-variable">$paged</span> --&gt;= <span class="hljs-number">2</span> || <span class="hljs-variable">$page</span> &gt;= <span class="hljs-number">2</span> )
        <span class="hljs-keyword">echo</span> <span class="hljs-string">' » '</span> . <span class="hljs-title function_ invoke__">sprintf</span>( <span class="hljs-title function_ invoke__">__</span>( <span class="hljs-string">'Page %s'</span>, <span class="hljs-string">'twentyten'</span> ), <span class="hljs-title function_ invoke__">max</span>( <span class="hljs-variable">$paged</span>, <span class="hljs-variable">$page</span> ) );
<span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Blog name</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">bloginfo</span>(<span class="hljs-string">'name'</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Blog address</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">bloginfo</span>(<span class="hljs-string">'url'</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">CSS file</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">bloginfo</span>(<span class="hljs-string">'stylesheet_url'</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Theme path</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">bloginfo</span>(<span class="hljs-string">'template_url'</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Call header.php</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">get_header</span>(<span class="hljs-string">''</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Call sidebar.php</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">get_sidebar</span>(<span class="hljs-string">''</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Call footer.php</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">get_footer</span>(<span class="hljs-string">''</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Tag ends</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-comment">/*  before */</span>
<span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">wp_head</span>(); <span class="hljs-meta">?&gt;</span>

<span class="hljs-comment">/* to end  */</span>
<span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">wp_footer</span>(); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Page template</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-comment">/* Template Name: Page Name */</span> <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Theme style text</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-comment">/*
Theme Name: 
Theme URI: 
Description: 
Author: 
Author URI: 
Version: 1.0
*/</span></code></pre>
<h6 class="heading small pt-4 mb-3 mb-lg-3 text-body">MENU CONTEXTS</h6>
<p><b class="small mt-3 d-block">Lists pages</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">wp_list_pages</span>(<span class="hljs-string">'title_li='</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Removing certain pages from the menu</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">wp_list_pages</span>(<span class="hljs-string">'exclude=id&amp;title_li='</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Lists only pages with entered IDs</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">wp_list_pages</span>(<span class="hljs-string">'include=id,id&amp;title_li='</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">List categories</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">wp_list_cats</span>(<span class="hljs-string">'title_li='</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Category listing (custom menu)</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> 
    <span class="hljs-variable">$category_ids</span> = <span class="hljs-title function_ invoke__">get_all_category_ids</span>();
    <span class="hljs-keyword">foreach</span>(<span class="hljs-variable">$category_ids</span> <span class="hljs-keyword">as</span> <span class="hljs-variable">$cat_id</span>) {
        <span class="hljs-variable">$cat_name</span> = <span class="hljs-title function_ invoke__">get_cat_name</span>(<span class="hljs-variable">$cat_id</span>);
        <span class="hljs-variable">$category_url</span> = <span class="hljs-title function_ invoke__">get_category_link</span>(<span class="hljs-variable">$cat_id</span>);
        <span class="hljs-keyword">echo</span> <span class="hljs-string">'&lt;a href="'</span>.<span class="hljs-variable">$category_url</span>.<span class="hljs-string">'"&gt;&lt;li class="list-group-item"&gt;'</span> . <span class="hljs-variable">$cat_name</span> . <span class="hljs-string">'&lt;/li&gt;&lt;/a&gt;'</span>;
    }
<span class="hljs-meta">?&gt;</span></code></pre>
<h6 class="heading small pt-4 mb-3 mb-lg-3 text-body">CONTENT CONTEXTS</h6>
<p><b class="small mt-3 d-block">While loop</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">while</span>(<span class="hljs-title function_ invoke__">have_posts</span>()) <span class="hljs-title function_ invoke__">the_post</span>(); <span class="hljs-meta">?&gt;</span>
    <span class="hljs-comment">//content</span>
<span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">endwhile</span>; <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Category name on category page</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">printf</span>( <span class="hljs-title function_ invoke__">__</span>( <span class="hljs-string">'%s'</span>, <span class="hljs-string">'solopine'</span> ), <span class="hljs-title function_ invoke__">single_cat_title</span>( <span class="hljs-string">''</span>, <span class="hljs-literal">false</span> ) ); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Category description on category page</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">echo</span> <span class="hljs-title function_ invoke__">category_description</span>(); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Image of the post (Adding a class to the post Thumbnail)</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">echo</span> <span class="hljs-title function_ invoke__">get_the_post_thumbnail</span>( <span class="hljs-variable">$post_id</span>, <span class="hljs-string">'thumbnail'</span>, <span class="hljs-keyword">array</span>(<span class="hljs-string">'class'</span> =&gt; <span class="hljs-string">'img-responsive img-circle post-image'</span>)); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">List the articles belonging to the category</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">if</span> (<span class="hljs-title function_ invoke__">have_posts</span>()) <span class="hljs-meta">?&gt;</span>
<span class="hljs-meta">&lt;?php</span> <span class="hljs-variable">$query</span> = <span class="hljs-keyword">new</span> <span class="hljs-title class_">WP_Query</span>(<span class="hljs-string">"cat=1&amp;showposts=10"</span>); <span class="hljs-keyword">while</span>(<span class="hljs-variable">$query</span>-&gt;<span class="hljs-title function_ invoke__">have_posts</span>()) <span class="hljs-variable">$query</span>-&gt;<span class="hljs-title function_ invoke__">the_post</span>();<span class="hljs-meta">?&gt;</span> 
<span class="hljs-comment">//content</span>
<span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">endwhile</span>; <span class="hljs-meta">?&gt;</span>
<span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">endif</span>; <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Latest articles</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">query_posts</span>(<span class="hljs-string">'showposts=10'</span>); <span class="hljs-meta">?&gt;</span>
<span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">while</span> (<span class="hljs-title function_ invoke__">have_posts</span>()) <span class="hljs-title function_ invoke__">the_post</span>();<span class="hljs-meta">?&gt;</span>
<span class="hljs-comment">// content</span>
<span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">endwhile</span>;<span class="hljs-meta">?&gt;</span>
<span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">wp_reset_query</span>(); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Post title</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_title</span>(<span class="hljs-string">''</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Post address</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_permalink</span>(<span class="hljs-string">''</span>) <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Post category</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_category</span>(<span class="hljs-string">', '</span>) <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Post category – HTML</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">foreach</span>((<span class="hljs-title function_ invoke__">get_the_category</span>()) <span class="hljs-keyword">as</span> <span class="hljs-variable">$category</span>) { <span class="hljs-keyword">echo</span> <span class="hljs-variable">$category</span>-&gt;cat_name . <span class="hljs-string">', '</span>; } <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Text content</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_content</span>(<span class="hljs-string">''</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Text content limit</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">echo</span> <span class="hljs-title function_ invoke__">wp_trim_words</span>( <span class="hljs-title function_ invoke__">get_the_content</span>(), <span class="hljs-number">40</span>, <span class="hljs-string">'...'</span> );<span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Posting Time of the Article</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_time</span>(<span class="hljs-string">'H:i:s'</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Number of comments on the article</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">comments_popup_link</span>(<span class="hljs-title function_ invoke__">__</span>(<span class="hljs-string">'No comment'</span>), <span class="hljs-title function_ invoke__">__</span>(<span class="hljs-string">'1 comment'</span>), <span class="hljs-title function_ invoke__">__</span>(<span class="hljs-string">'% comments'</span>), <span class="hljs-string">''</span>, <span class="hljs-title function_ invoke__">__</span>(<span class="hljs-string">'Comments closed'</span>)); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Post read count (requires WP-PostViews plugin)</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">if</span>(<span class="hljs-title function_ invoke__">function_exists</span>(<span class="hljs-string">'the_views'</span>)) { <span class="hljs-title function_ invoke__">the_views</span>(); } <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Text ID</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_ID</span>(); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Post edit link</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">edit_post_link</span>(); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Comment template</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">comments_template</span>(); <span class="hljs-meta">?&gt;</span></code></pre>
<h6 class="heading small pt-4 mb-3 mb-lg-3 text-body">AUTHOR CONTEXTS</h6>
<p><b class="small mt-3 d-block">Author name</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_author</span>(<span class="hljs-string">''</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">About the author</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_author_description</span>(<span class="hljs-string">''</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Author name</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_author_firstname</span>(<span class="hljs-string">''</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Author surname</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_author_lastname</span>(<span class="hljs-string">''</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Number of articles by the author</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_author_posts</span>(<span class="hljs-string">''</span>);<span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Author page link</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_author_link</span>(<span class="hljs-string">''</span>);<span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Author’s website</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_author_url</span>(<span class="hljs-string">''</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Author’s e-mail address</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_author_email</span>(<span class="hljs-string">''</span>);<span class="hljs-meta">?&gt;</span></code></pre>
<h6 class="heading small pt-4 mb-3 mb-lg-3 text-body">EXTRA CONTEXTS</h6>
<p><b class="small mt-3 d-block">Special menu</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-comment">// Functions</span>
<span class="hljs-title function_ invoke__">add_action</span>(<span class="hljs-string">'init'</span>, <span class="hljs-string">'theme_menus'</span>);
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">theme_menus</span>() </span>{
    <span class="hljs-title function_ invoke__">register_nav_menus</span>(
        <span class="hljs-keyword">array</span>(
        <span class="hljs-string">'anamenu'</span> =&gt; <span class="hljs-title function_ invoke__">__</span>(<span class="hljs-string">'Primary Menu'</span>),
        <span class="hljs-string">'sagmenu'</span> =&gt; <span class="hljs-title function_ invoke__">__</span>(<span class="hljs-string">'Side Menu'</span>)
        )
    );
}
<span class="hljs-comment">// Calling menu</span>
<span class="hljs-title function_ invoke__">wp_nav_menu</span>( <span class="hljs-keyword">array</span>( <span class="hljs-string">'container_id'</span> =&gt; <span class="hljs-string">'submenu'</span>, <span class="hljs-string">'theme_location'</span> =&gt; <span class="hljs-string">'anamenu'</span>,<span class="hljs-string">'menu_class'</span>=&gt;<span class="hljs-string">'sf-menu'</span>,<span class="hljs-string">'fallback_cb'</span>=&gt; <span class="hljs-string">'fallbackmenu'</span> ) );</code></pre>
<p><b class="small mt-3 d-block">Adding elements to the beginning or end of a custom menu</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-comment">// Add the Homepage link to the beginning of the menu elements</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">menu_ekleme</span>(<span class="hljs-params"><span class="hljs-variable">$content</span></span>) </span>{
    <span class="hljs-variable">$content</span> = <span class="hljs-string">'&lt;li class="current colordefault home_class"glt;&lt;a href="index.html"glt;&lt;i class="icon-home"glt;&lt;/iglt;&lt;/aglt;&lt;/liglt;'</span> . <span class="hljs-variable">$content</span>;
    <span class="hljs-keyword">return</span> <span class="hljs-variable">$content</span>;
}
<span class="hljs-title function_ invoke__">add_filter</span>(<span class="hljs-string">'wp_nav_menu_anamenu_items'</span>, <span class="hljs-string">'menu_ekleme'</span>);</code></pre>
<p><b class="small mt-3 d-block">Calling the photo uploaded specifically to the ID</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">valuePhoto</span>(<span class="hljs-params"><span class="hljs-variable">$photoID</span></span>)</span>{
    <span class="hljs-variable">$imageSrc</span> = <span class="hljs-variable">$photoID</span>;
    <span class="hljs-keyword">if</span> (<span class="hljs-title function_ invoke__">is_numeric</span>(<span class="hljs-variable">$photoID</span>)) {
        <span class="hljs-variable">$imageAttachment</span> = <span class="hljs-title function_ invoke__">wp_get_attachment_image_src</span>(<span class="hljs-variable">$photoID</span>,<span class="hljs-string">'full'</span>);
        <span class="hljs-variable">$imageSrc</span> = <span class="hljs-variable">$imageAttachment</span>[<span class="hljs-number">0</span>];
        <span class="hljs-keyword">return</span> <span class="hljs-variable">$imageSrc</span>;
    }
}</code></pre>
<p><b class="small mt-3 d-block">Uninstalling the WordPress toolbar (functions.php)</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-comment">/* Disable the admin bar feature */</span>
    <span class="hljs-title function_ invoke__">add_filter</span>( <span class="hljs-string">'show_admin_bar'</span>, <span class="hljs-string">'__return_false'</span> );
      
    <span class="hljs-comment">/* Remove Admin Bar options from user profile */</span>
    <span class="hljs-title function_ invoke__">remove_action</span>( <span class="hljs-string">'personal_options'</span>, <span class="hljs-string">'_admin_bar_preferences'</span> );</code></pre>
<p><b class="small mt-3 d-block">Calling custom field tag to page</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">echo</span> <span class="hljs-title function_ invoke__">get_post_meta</span>(<span class="hljs-variable">$post</span>-&gt;ID, <span class="hljs-string">"ozel_alan_etiketi"</span>, <span class="hljs-literal">true</span>); <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Next post</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">next_post_link</span>(<span class="hljs-string">''</span>) <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Front text</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">previous_post_link</span>(<span class="hljs-string">''</span>) <span class="hljs-meta">?&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Featured image use</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-comment">/* Inside the while loop */</span>
    <span class="hljs-meta">&lt;?php</span> <span class="hljs-keyword">if</span> ( <span class="hljs-title function_ invoke__">has_post_thumbnail</span>() ) {<span class="hljs-title function_ invoke__">the_post_thumbnail</span>();} <span class="hljs-keyword">else</span> {}<span class="hljs-meta">?&gt;</span>
  
<span class="hljs-comment">/* will be added in funtions.php */</span>
    <span class="hljs-title function_ invoke__">add_theme_support</span>( <span class="hljs-string">'post-thumbnails'</span> );
    <span class="hljs-title function_ invoke__">set_post_thumbnail_size</span>( <span class="hljs-number">125</span>, <span class="hljs-number">125</span> );</code></pre>
<p><b class="small mt-3 d-block">Quoting part – using the expert</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-comment">/* Inside While Loop */</span>
    <span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">the_excerpt</span>(<span class="hljs-string">''</span>); <span class="hljs-meta">?&gt;</span>
  
    <span class="hljs-comment">/* will be added in functions.php */</span>
    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">new_excerpt_length</span>(<span class="hljs-params"><span class="hljs-variable">$length</span></span>) </span>{
    <span class="hljs-keyword">return</span> <span class="hljs-number">12</span>;
    }
    <span class="hljs-title function_ invoke__">add_filter</span>(<span class="hljs-string">'excerpt_length'</span>, <span class="hljs-string">'new_excerpt_length'</span>);</code></pre>
<p><b class="small mt-3 d-block">Search form</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs">&lt;form method=<span class="hljs-string">"get"</span> id=<span class="hljs-string">"searchform"</span> action=<span class="hljs-string">"&lt;?php bloginfo('url'); ?&gt;"</span>&gt;
    &lt;input <span class="hljs-class"><span class="hljs-keyword">class</span>="<span class="hljs-title">searchbg</span>" <span class="hljs-title">type</span>="<span class="hljs-title">text</span>" <span class="hljs-title">name</span>="<span class="hljs-title">s</span>" <span class="hljs-title">id</span>="<span class="hljs-title">s</span>" <span class="hljs-title">onfocus</span>="<span class="hljs-title">if</span> (<span class="hljs-title">this</span>.<span class="hljs-title">value</span> == '<span class="hljs-title">Ara</span> ...') </span>{this.value = <span class="hljs-string">''</span>;}<span class="hljs-string">" onblur="</span><span class="hljs-keyword">if</span> (this.value == <span class="hljs-string">''</span>) {this.value = <span class="hljs-string">'Ara ...'</span>;}<span class="hljs-string">"&gt;
    &lt;input class="</span>button<span class="hljs-string">" type="</span>button<span class="hljs-string">" value="</span><span class="hljs-string">"&gt;
&lt;/form&gt;</span></code></pre>
<p><b class="small mt-3 d-block">Pagination (Pagenavi plugin)</b></p>
<pre class="mb-0 mt-2"><code class="language-php d-block shadow-none hljs"><span class="hljs-meta">&lt;?php</span> <span class="hljs-title function_ invoke__">wp_pagenavi</span>(); <span class="hljs-meta">?&gt;</span></code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>MyBB Değişkenleri</title>
		<link>https://kkerem.com/mybb-degiskenleri/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 18 Apr 2019 08:20:55 +0000</pubDate>
				<category><![CDATA[MyBB]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://localhost/kerem/?p=181</guid>

					<description><![CDATA[&#60;?php define("IN_MYBB", 1); require_once "./global.php"; if($mybb-&#62;user['uid'] == KULLANICI_ID) { echo '&#60;pre&#62;'; var_dump($mybb); echo '&#60;/pre&#62;'; } ?&#62; KULLANICI_ID bölümüne sadece sizin görebilmeniz için int şeklinde kullanıcı idsi girilmesi gerekmekte.]]></description>
										<content:encoded><![CDATA[<pre><code class="language-php hljs"><span class="hljs-meta">&lt;?php</span>
<span class="hljs-title function_ invoke__">define</span>(<span class="hljs-string">"IN_MYBB"</span>, <span class="hljs-number">1</span>);
<span class="hljs-keyword">require_once</span> <span class="hljs-string">"./global.php"</span>;

<span class="hljs-keyword">if</span>(<span class="hljs-variable">$mybb</span>-&gt;user[<span class="hljs-string">'uid'</span>] == KULLANICI_ID) {
  <span class="hljs-keyword">echo</span> <span class="hljs-string">'&lt;pre&gt;'</span>;
  <span class="hljs-title function_ invoke__">var_dump</span>(<span class="hljs-variable">$mybb</span>);
  <span class="hljs-keyword">echo</span> <span class="hljs-string">'&lt;/pre&gt;'</span>;
}
<span class="hljs-meta">?&gt;</span></code></pre>
<p>KULLANICI_ID bölümüne sadece sizin görebilmeniz için int şeklinde kullanıcı idsi girilmesi gerekmekte.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Add gag query to BaseChat</title>
		<link>https://kkerem.com/add-gag-query-to-basechat/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 22 Feb 2018 16:41:48 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C++]]></category>
		<guid isPermaLink="false">http://localhost/kerem/?p=170</guid>

					<description><![CDATA[By default, sending a message to the authorities via chat, which is set to the &#8220;@&#8221; tag, sends it without checking if the sender has found an active gag penalty. This issue can cause the player to still annoy the authorities from the authorized chat, even though the player has received a gag penalty. First [&#8230;]]]></description>
										<content:encoded><![CDATA[<p dir="auto">By default, sending a message to the authorities via chat, which is set to the &#8220;@&#8221; tag, sends it without checking if the sender has found an active gag penalty. This issue can cause the player to still annoy the authorities from the authorized chat, even though the player has received a gag penalty.</p>
<h3 dir="auto"><a id="user-content-first-step" href="https://github.com/kKerem/Add-Gag-Query-to-BaseChat#first-step" aria-hidden="true"></a>First step</h3>
<p dir="auto">Put it on top line</p>
<pre><code class="language-cpp hljs"><span class="hljs-meta">#<span class="hljs-keyword">include</span> <span class="hljs-string">&lt;basecomm&gt;</span></span></code></pre>
<hr />
<h3 dir="auto"><a id="user-content-second-step" href="https://github.com/kKerem/Add-Gag-Query-to-BaseChat#second-step" aria-hidden="true"></a>Second step</h3>
<p dir="auto">Add this instead of &#8220;if (IsClientInGame(i) &amp;&amp; (from == i || Ch&#8230;&#8221; in void &#8220;SendChatToAdmins&#8221; (Line: 363 in version 1.8.0.6015)</p>
<div>
<pre><code class="language-cpp hljs"><span class="hljs-keyword">if</span> (!<span class="hljs-built_in">BaseComm_IsClientGagged</span>(i))
  {
    <span class="hljs-built_in">CPrintToChat</span>(i, <span class="hljs-string">"[SM] %s%N: %s"</span>, fromAdmin ? <span class="hljs-string">"(Admin) "</span> : <span class="hljs-string">"(Player) "</span>, from, message);
  }
</code></pre>
</div>
<hr />
<h3 dir="auto"><a id="user-content-last-step" href="https://github.com/kKerem/Add-Gag-Query-to-BaseChat#last-step" aria-hidden="true"></a>Last step</h3>
<p dir="auto">Compile the file.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WordPress Login sayfasına CSS</title>
		<link>https://kkerem.com/wordpress-login-sayfasina-css/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 14 Jan 2018 21:31:49 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://localhost/kerem/?p=167</guid>

					<description><![CDATA[Aşağıda ki kodları functions.php içerisine eklemeniz yeterli. function my_login_stylesheet() { echo ' &#60;style type="text/css"&#62; body {background: #FFF !important;max-width: 400px;width: 95%;margin: 0 auto !important} #login {width: 100% !important;padding-top:30%} #login_error #login_error {display: none !important} #login form {box-shadow: none;margin-top:0;background:none} .login .button.wp-hide-pw .dashicons {top: 1.25rem !important;} #login form input {transition:.3s;} #login form input[type="text"]:focus, #login input[type="password"]:focus {outline:2px auto #2076D8;} #login input[type="text"], #login [&#8230;]]]></description>
										<content:encoded><![CDATA[<p class="my-3">Aşağıda ki kodları <code>functions.php</code> içerisine eklemeniz yeterli.</p>
<pre><code class="language-php hljs"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">my_login_stylesheet</span>() </span>{
    <span class="hljs-keyword">echo</span> <span class="hljs-string">'
    &lt;style type="text/css"&gt;
    body {background: #FFF !important;max-width: 400px;width: 95%;margin: 0 auto !important}
    #login {width: 100% !important;padding-top:30%}
    #login_error #login_error {display: none !important}
    #login form {box-shadow: none;margin-top:0;background:none}
    .login .button.wp-hide-pw .dashicons {top: 1.25rem !important;}
    #login form input {transition:.3s;}
    #login form input[type="text"]:focus, #login input[type="password"]:focus {outline:2px auto #2076D8;}
    #login input[type="text"], #login input[type="password"] {transition: .2s;padding: 10px;border: 1px solid #eaecef;background: #FFF !important;box-shadow: none !important;border-radius: 3px;box-sizing: border-box;font-size: 16px;margin-top:15px;box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;}
    #login input[type="submit"] {padding: 20px;display: block;background-color: #2076D8;font-weight: 600;color: #FFF;margin-top: 5px;border: none;line-height: 0;width: 100%;margin: 15px 0;box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;}
    #login input[type="submit"]:hover {background-color: #0a64ca;cursor: pointer;}
    #login input[type="checkbox"] {box-shadow:none;border-radius: 4px;background: white;border: 1px solid #eaecef;}
    #login .submit {display: block !important;}
    #login .message {border: 1px solid #eaecef;border-radius: 0.25rem;border-left: 4px solid #00a0d2;padding: 1rem;margin: 40px 25px 0 25px;box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;}
    #nav{text-align:center;}
    #backtoblog {display: none}
    &lt;/style&gt;
    '</span>; 
} 
<span class="hljs-title function_ invoke__">add_action</span>(<span class="hljs-string">'login_enqueue_scripts'</span>, <span class="hljs-string">'my_login_stylesheet'</span>);

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">my_login_logo_url</span>() </span>{
    <span class="hljs-keyword">return</span> <span class="hljs-title function_ invoke__">home_url</span>();
}
<span class="hljs-title function_ invoke__">add_filter</span>(<span class="hljs-string">'login_headerurl'</span>, <span class="hljs-string">'my_login_logo_url'</span>);

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">my_login_logo_url_title</span>() </span>{
    <span class="hljs-keyword">return</span> <span class="hljs-string">''</span>;
}
<span class="hljs-title function_ invoke__">add_filter</span>(<span class="hljs-string">'login_headertitle'</span>, <span class="hljs-string">'my_login_logo_url_title'</span>);</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
