ghoys
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Show WordPress Pages on Android AppI using API for my app. This the API to get the connectin into homepage.
package com.app.wordpress.connection; import com.app.wordpress.connection.callbacks.CallbackCategories; import com.app.wordpress.connection.callbacks.CallbackCategoryDetails; import com.app.wordpress.connection.callbacks.CallbackComment; import com.app.wordpress.connection.callbacks.CallbackDetailsPost; import com.app.wordpress.connection.callbacks.CallbackDevice; import com.app.wordpress.connection.callbacks.CallbackInfo; import com.app.wordpress.connection.callbacks.CallbackListPost; import com.app.wordpress.model.DeviceInfo; import retrofit2.Call; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Headers; import retrofit2.http.POST; import retrofit2.http.Query; public interface API { /* your wordPress url */ String BASE_URL = "http://bogorone.co.id/"; // minimize field for list of post String EXCLUDE_FIELD = "&exclude=content,categories,tags,comments,custom_fields"; /* info API transaction ------------------------------- */ @GET("?json=info") Call<CallbackInfo> getInfo(); /* Post API transaction ------------------------------- */ @Headers({"Cache-Control: max-age=0", "User-Agent: WordPress"}) @GET("?json=get_posts" + EXCLUDE_FIELD) Call<CallbackListPost> getPostByPage( @Query("page") int page, @Query("count") int count ); @Headers({"Cache-Control: max-age=0", "User-Agent: WordPress"}) @GET("?json=get_post") Call<CallbackDetailsPost> getPostDetialsById( @Query("id") int id ); @Headers({"Cache-Control: max-age=0", "User-Agent: WordPress"}) @GET("?json=get_search_results" + EXCLUDE_FIELD) Call<CallbackListPost> getSearchPosts( @Query("search") String search, @Query("count") int count ); /* Category API transaction --------------------------- */ @Headers({"Cache-Control: max-age=0", "User-Agent: WordPress"}) @GET("?json=get_category_index") Call<CallbackCategories> getAllCategories(); @Headers({"Cache-Control: max-age=0", "User-Agent: WordPress"}) @GET("?json=get_category_posts" + EXCLUDE_FIELD) Call<CallbackCategoryDetails> getCategoryDetailsByPage( @Query("id") int id, @Query("page") int page, @Query("count") int count ); @Headers({"Cache-Control: max-age=0", "User-Agent: WordPress"}) @GET("?json=respond/submit_comment") Call<CallbackComment> sendComment( @Query("post_id") long post_id, @Query("name") String name, @Query("email") String email, @Query("content") String content ); @Headers({"Cache-Control: max-age=0", "User-Agent: WordPress"}) @POST("?api-fcm=register") Call<CallbackDevice> registerDevice(@Body DeviceInfo deviceInfo); }The realm is only to fit what my web is appearing. But there is familiar code like slug for post type..
Forum: Developing with WordPress
In reply to: Unable to Add Featured Image in “Add Post”Its a malware. I have remove the code on a post-template.php and my functions.php works with 644, before i removee that code my functions.php always request username and passsword..
Forum: Developing with WordPress
In reply to: Display post with style in homepage instead a only content.Finally, I have done with a code
<?php $content = get_the_content(); echo mb_strimwidth($content, 0, 5000, '...');?>Forum: Developing with WordPress
In reply to: Display post with style in homepage instead a only content.I have a code to show the posts styles in homepage with
<?php $content = get_the_content('Read more'); print $content; ?>Now i move it to limit the words in homepage with
<?php echo wp_trim_words( get_the_content(), 40, '...' ); ?>But the style is gone and only show the text of my posts. How to limit words with the <?php get_the_content(); ?> ?
Forum: Developing with WordPress
In reply to: Unable to Add Featured Image in “Add Post”Resolved! My WordPress is infected by virus..
Forum: Developing with WordPress
In reply to: Unable to Add Featured Image in “Add Post”Now I change the permission for the functions.php. I change to 554. And add featured image is work.. Because when I change it to 644, wordpress add the code and say “break” and “die”.
Forum: Developing with WordPress
In reply to: Unable to Add Featured Image in “Add Post”If I using other themes, featured image works as well! Let me know the problem here..
Forum: Developing with WordPress
In reply to: Unable to Add Featured Image in “Add Post”Ok. Its gone again for now.. I don’t know why?
and its deleted by wordpress..- This reply was modified 7 years, 4 months ago by ghoys.
Forum: Developing with WordPress
In reply to: Unable to Add Featured Image in “Add Post”Ok. I Have enabled featured image by using other functions.php and not function.php
But, not available whit block editor. Its only available for classic editor..
- This reply was modified 7 years, 4 months ago by ghoys.
Forum: Developing with WordPress
In reply to: Unable to Add Featured Image in “Add Post”Ok. How to create a valid theme? And was invalid there?
Forum: Developing with WordPress
In reply to: Unable to Add Featured Image in “Add Post”Ok. Thath is function.php.
I understanding about the child and father theme? Ok, this my theme https://drive.google.com/file/d/1vpV-4vLv-FQAT9EOJSzvUkY2be1VV89M/view?usp=sharingMy WP Is lastest
I dont see metabox on editor, i only see the add tittle, paragraph and some plugins like yoast and pixelsite..Forum: Developing with WordPress
In reply to: Unable to Add Featured Image in “Add Post”I Don’t know exactly why featured image cannot be loaded in post panel..
Ok, I Have delete the enqueue script. But still cant add featured image..
Forum: Developing with WordPress
In reply to: Understanding Get Body ClassIs something like this?
function theme_modify_body_classes( $classes ) { // Additional classes to single posts if( is_single() && is_single( 'post-template-default', 'single', 'single-post', 'single-format-standard', 'custom-background', 'navbar-position-right'. 'header-position-left', 'custom-header', 'custom-header-image' ) ) { $classes[] = 'single-post'; } return $classes; } add_action( 'body_class', 'theme_modify_body_classes' );Forum: Localhost Installs
In reply to: function.php what the effect?Ok. I Understand about that. Btw, what you using to edit the theme?